Re: [PATCH] ASoC: snd-sof-pci - add model parameter and pass it to HDA codec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

Humm, I must admit I have never looked at this for the legacy driver,
and I am a bit confused on what this would be used for?
The legacy driver uses codec->modelname but I can't figure out this
part in hda_codec.c

if (codec->bus->modelname) {
	codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);

In theory there can be multiple codecs per bus (with different SDIs)
so using the bus->modelname for the codec->modelname looks odd.

That's true.  However, basically the model name is specific to the
whole device, hence it's usually OK to pass to all codecs.  The
mismatched model name is just ignored (that's why the current code
with model="sofbus" works).  So you can think it a kind of quirk
lookup with a system name given explicitly by user.

Is there an example of this being used for my education?

You can find the list in Documentation/sound/hd-audio/models.rst
and the usage in Documentation/sound/hd-audio/notes.rst.  The
documents are a bit outdated, though.

ah, ok, thanks for the pointers.

So if you have a new machine that's not explicitly handled by quirks you can initially force existing tricks to be used, and in a second step the quirk is extended to handle that machine, yes?
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux