Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Mark Brown <broonie@kernel.org>
Cc: "Cezary Rojewski" <cezary.rojewski@intel.com>,
	linux-sound@vger.kernel.org,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Subject: [PATCH 06/20] ASoC: Intel: avs: boards: Change hdaudio card name
Date: Mon,  7 Apr 2025 14:41:40 +0200	[thread overview]
Message-ID: <20250407124154.1713039-7-amadeuszx.slawinski@linux.intel.com> (raw)
In-Reply-To: <20250407124154.1713039-1-amadeuszx.slawinski@linux.intel.com>

Rename FE from "hdaudioB0D0"/"hdaudioB0D2" to "AVS HD-Audio"/"AVS HDMI".

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/avs/boards/hdaudio.c | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/avs/boards/hdaudio.c b/sound/soc/intel/avs/boards/hdaudio.c
index cb6d54db71892..4b8a2dc4b4a38 100644
--- a/sound/soc/intel/avs/boards/hdaudio.c
+++ b/sound/soc/intel/avs/boards/hdaudio.c
@@ -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;
-- 
2.34.1


  parent reply	other threads:[~2025-04-07 12:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 12:41 [PATCH 00/20] ASoC: Intel: avs: Update machine board card names Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 01/20] ASoC: Intel: avs: boards: Add Kconfig option for obsolete " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 02/20] ASoC: Intel: avs: Use topology information for endpoint numbers Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 03/20] ASoC: Intel: avs: boards: Change da7219 card name Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 04/20] ASoC: Intel: avs: boards: Change DMIC " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 05/20] ASoC: Intel: avs: boards: Change es8336 " Amadeusz Sławiński
2025-04-07 12:41 ` Amadeusz Sławiński [this message]
2025-04-07 12:41 ` [PATCH 07/20] ASoC: Intel: avs: boards: Change sspX-loopback " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 08/20] ASoC: Intel: avs: boards: Change max98357a " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 09/20] ASoC: Intel: avs: boards: Change max98373 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 10/20] ASoC: Intel: avs: boards: Change max98927 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 11/20] ASoC: Intel: avs: boards: Change nau8825 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 12/20] ASoC: Intel: avs: boards: Change pcm3168a " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 13/20] ASoC: Intel: avs: boards: Change probe " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 14/20] ASoC: Intel: avs: boards: Change rt274 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 15/20] ASoC: Intel: avs: boards: Change rt286 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 16/20] ASoC: Intel: avs: boards: Change rt298 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 17/20] ASoC: Intel: avs: boards: Change rt5514 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 18/20] ASoC: Intel: avs: boards: Change rt5663 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 19/20] ASoC: Intel: avs: boards: Change rt5682 " Amadeusz Sławiński
2025-04-07 12:41 ` [PATCH 20/20] ASoC: Intel: avs: boards: Change ssm4567 " Amadeusz Sławiński
2025-04-07 12:46 ` [PATCH 00/20] ASoC: Intel: avs: Update machine board card names Jaroslav Kysela
2025-04-07 13:42 ` Cezary Rojewski
2025-04-08 12:49 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250407124154.1713039-7-amadeuszx.slawinski@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox