alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: snd-sof-intel-hda-common - add hda_model parameter and pass it to HDA codec driver
@ 2020-04-24  9:25 Jaroslav Kysela
  2020-04-24 12:24 ` Kai Vehmanen
  2020-04-24 17:00 ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Jaroslav Kysela @ 2020-04-24  9:25 UTC (permalink / raw)
  To: ALSA development; +Cc: Takashi Iwai, Mark Brown, Pierre-Louis Bossart

It may be useful to pass the specific model to the generic HDA codec
routines like the legacy HDA driver (snd-hda-intel) allows.
The model name "sofbus" is tricky anyway.

Original proposal: https://lore.kernel.org/alsa-devel/20191203161908.7496-1-perex@perex.cz/

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
---
 sound/soc/sof/intel/hda.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 211e91e79eae..ea0189ee8939 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -282,6 +282,10 @@ module_param_named(use_msi, hda_use_msi, bool, 0444);
 MODULE_PARM_DESC(use_msi, "SOF HDA use PCI MSI mode");
 #endif
 
+static char *hda_model;
+module_param(hda_model, charp, 0444);
+MODULE_PARM_DESC(hda_model, "Use the given HDA board model.");
+
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
 static int hda_dmic_num = -1;
 module_param_named(dmic_num, hda_dmic_num, int, 0444);
@@ -503,7 +507,7 @@ static int hda_init(struct snd_sof_dev *sdev)
 	mutex_init(&hbus->prepare_mutex);
 	hbus->pci = pci;
 	hbus->mixer_assigned = -1;
-	hbus->modelname = "sofbus";
+	hbus->modelname = hda_model;
 
 	/* initialise hdac bus */
 	bus->addr = pci_resource_start(pci, 0);
-- 
2.25.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-24 17:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24  9:25 [PATCH] ASoC: snd-sof-intel-hda-common - add hda_model parameter and pass it to HDA codec driver Jaroslav Kysela
2020-04-24 12:24 ` Kai Vehmanen
2020-04-24 12:41   ` Takashi Iwai
2020-04-24 15:44     ` Pierre-Louis Bossart
2020-04-24 16:06       ` Takashi Iwai
2020-04-24 17:01         ` Pierre-Louis Bossart
2020-04-24 17:00 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).