ASoC: snd-sof-intel-hda-common - add hda_model parameter and pass it to HDA codec driver
Subsystems (3)
Jaroslav Kysela
maintainerPATCH 1/1 ASoC: snd-sof-intel-hda-common - add hda_model parameter and pass it 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]/
--- sound/soc/sof/intel/hda.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
sound/soc/sof/intel/hda.c +5 -1
@@ -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 );
Signature · 1 line
2.25.3
Hey,
Quoted 2 lines · Jaroslav Kysela
It may be useful to pass the specific model to the generic HDA codec routines like the legacy HDA driver (snd-hda-intel) allows.
[...]
Quoted 1 line
Original proposal: https://lore.kernel.org/alsa-devel/[email protected]/
not sure why this got stuck last year, but seems like a welcome addition:
Quoted 1 line
The model name "sofbus" is tricky anyway.
Hmm, I wonder is this now doing more harm than good. Based on browsing through the related code in hda-codec.c and friends, it would seem "sofbus" as the default is mostly harmless, but I could have missed something.
Br, Kai
Takashi Iwai
Reviewed-byQuoted 13 lines · Kai Vehmanen
Hey,
Quoted 2 lines · Jaroslav Kysela
It may be useful to pass the specific model to the generic HDA codec routines like the legacy HDA driver (snd-hda-intel) allows.
[...]
Quoted 1 line
Original proposal: https://lore.kernel.org/alsa-devel/[email protected]/
not sure why this got stuck last year, but seems like a welcome addition:
Quoted 8 lines
Reviewed-by Kai Vehmanen <[email protected]>Quoted 1 line
The model name "sofbus" is tricky anyway.
Hmm, I wonder is this now doing more harm than good. Based on browsing through the related code in
hda-codec.cand friends, it would seem "sofbus" as the default is mostly harmless, but I could have missed something.
That's currently harmless since no codec driver defines "sofbus" model, hence the HDA parser continues to match with the default quirks. OTOH, the fixed "sofbus" model is fairly useless. So, feel free to take my ack, too:
thanks,
Takashi
Quoted 11 lines
Quoted 6 lines
Hmm, I wonder is this now doing more harm than good. Based on browsing through the related code in
hda-codec.cand friends, it would seem "sofbus" as the default is mostly harmless, but I could have missed something.That's currently harmless since no codec driver defines "sofbus" model, hence the HDA parser continues to match with the default quirks. OTOH, the fixed "sofbus" model is fairly useless. So, feel free to take my ack, too:
For my education, are you saying that the default should be that the modelname is NULL, and the hda auto parser will use known quirks based on PCI/SSID information, and when the user sets the model name to a non-NULL string it will force a specific quirk to be used? Thanks!
Quoted 13 lines · Pierre-Louis Bossart
Quoted 8 lines
Quoted 7 lines
Hmm, I wonder is this now doing more harm than good. Based on browsing through the related code in
hda-codec.cand friends, it would seem "sofbus" as the default is mostly harmless, but I could have missed something.Quoted 4 lines
That's currently harmless since no codec driver defines "sofbus" model, hence the HDA parser continues to match with the default quirks. OTOH, the fixed "sofbus" model is fairly useless. So, feel free to take my ack, too:
Quoted 4 lines
For my education, are you saying that the default should be that the modelname is NULL, and the hda auto parser will use known quirks based on PCI/SSID information, and when the user sets the model name to a non-NULL string it will force a specific quirk to be used?
Yes. If the given string matches with the pre-defined table, the quirk entry is used and applied. If no string is given or it doesn't match, it continues to the fallback quirk, that is, matching with PCI SSID, then codec SSID.
Takashi
Quoted 16 lines
Quoted 11 lines
Quoted 10 lines
Quoted 5 lines
Hmm, I wonder is this now doing more harm than good. Based on browsing through the related code in
hda-codec.cand friends, it would seem "sofbus" as the default is mostly harmless, but I could have missed something.That's currently harmless since no codec driver defines "sofbus" model, hence the HDA parser continues to match with the default quirks. OTOH, the fixed "sofbus" model is fairly useless. So, feel free to take my ack, too:
Quoted 4 lines
For my education, are you saying that the default should be that the modelname is NULL, and the hda auto parser will use known quirks based on PCI/SSID information, and when the user sets the model name to a non-NULL string it will force a specific quirk to be used?
Quoted 4 lines
Yes. If the given string matches with the pre-defined table, the quirk entry is used and applied. If no string is given or it doesn't match, it continues to the fallback quirk, that is, matching with PCI SSID, then codec SSID.
Sounds good, thanks for the precisions Takashi
Mark Brown
maintainerQuoted 6 lines · Jaroslav Kysela
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]/
Quoted 7 lines
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]>[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.8
Thanks!
[1/1] ASoC: snd-sof-intel-hda-common - add hda_model parameter and pass it to HDA codec driver
commit: b8d3ad51dfec3631763cfef3d30c16f40140058b
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark