mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 13:59:45 -04:00
ASoC: Intel: avs: boards: Change hdaudio card name
Rename FE from "hdaudioB0D0"/"hdaudioB0D2" to "AVS HD-Audio"/"AVS HDMI". Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20250407124154.1713039-7-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
102d3f95e6
commit
65327c926e
@@ -13,6 +13,7 @@
|
||||
#include <sound/soc.h>
|
||||
#include <sound/soc-acpi.h>
|
||||
#include "../../../codecs/hda.h"
|
||||
#include "../utils.h"
|
||||
|
||||
static int avs_create_dai_links(struct device *dev, struct hda_codec *codec, int pcm_count,
|
||||
const char *platform_name, struct snd_soc_dai_link **links)
|
||||
@@ -95,7 +96,8 @@ avs_card_hdmi_pcm_at(struct snd_soc_card *card, int hdmi_idx)
|
||||
static int avs_card_late_probe(struct snd_soc_card *card)
|
||||
{
|
||||
struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev);
|
||||
struct hda_codec *codec = mach->pdata;
|
||||
struct avs_mach_pdata *pdata = mach->pdata;
|
||||
struct hda_codec *codec = pdata->codec;
|
||||
struct hda_pcm *hpcm;
|
||||
/* Topology pcm indexing is 1-based */
|
||||
int i = 1;
|
||||
@@ -124,6 +126,7 @@ static int avs_card_late_probe(struct snd_soc_card *card)
|
||||
static int avs_probing_link_init(struct snd_soc_pcm_runtime *rtm)
|
||||
{
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
struct avs_mach_pdata *pdata;
|
||||
struct snd_soc_dai_link *links = NULL;
|
||||
struct snd_soc_card *card = rtm->card;
|
||||
struct hda_codec *codec;
|
||||
@@ -131,7 +134,8 @@ static int avs_probing_link_init(struct snd_soc_pcm_runtime *rtm)
|
||||
int ret, pcm_count = 0;
|
||||
|
||||
mach = dev_get_platdata(card->dev);
|
||||
codec = mach->pdata;
|
||||
pdata = mach->pdata;
|
||||
codec = pdata->codec;
|
||||
|
||||
if (list_empty(&codec->pcm_list_head))
|
||||
return -EINVAL;
|
||||
@@ -167,12 +171,14 @@ static int avs_hdaudio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_dai_link *binder;
|
||||
struct snd_soc_acpi_mach *mach;
|
||||
struct avs_mach_pdata *pdata;
|
||||
struct snd_soc_card *card;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct hda_codec *codec;
|
||||
|
||||
mach = dev_get_platdata(dev);
|
||||
codec = mach->pdata;
|
||||
pdata = mach->pdata;
|
||||
codec = pdata->codec;
|
||||
|
||||
/* codec may be unloaded before card's probe() fires */
|
||||
if (!device_is_registered(&codec->core.dev))
|
||||
@@ -200,7 +206,16 @@ static int avs_hdaudio_probe(struct platform_device *pdev)
|
||||
if (!card)
|
||||
return -ENOMEM;
|
||||
|
||||
card->name = binder->codecs->name;
|
||||
if (pdata->obsolete_card_names) {
|
||||
card->name = binder->codecs->name;
|
||||
} else {
|
||||
card->driver_name = "avs_hdaudio";
|
||||
if (hda_codec_is_display(codec))
|
||||
card->long_name = card->name = "AVS HDMI";
|
||||
else
|
||||
card->long_name = card->name = "AVS HD-Audio";
|
||||
}
|
||||
|
||||
card->dev = dev;
|
||||
card->owner = THIS_MODULE;
|
||||
card->dai_link = binder;
|
||||
|
||||
Reference in New Issue
Block a user