Skip to content

Commit

Permalink
ASoC: snd-sof-intel-hda-common - add hda_model parameter and pass it …
Browse files Browse the repository at this point in the history
…to HDA codec driver

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/[email protected]/

Signed-off-by: Jaroslav Kysela <[email protected]>
Reviewed-by: Takashi Iwai <[email protected]>
Reviewed-by: Kai Vehmanen <[email protected]>
Cc: Pierre-Louis Bossart <[email protected]>
Cc: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
perexg authored and broonie committed Apr 24, 2020
1 parent 3e645a4 commit b8d3ad5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/soc/sof/intel/hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,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);
Expand Down Expand Up @@ -501,7 +505,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);
Expand Down

0 comments on commit b8d3ad5

Please sign in to comment.