Repository navigation
Conversation
…INK for hdmi The config item CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC is originally designed for HDA analog codec only, so it is not selected in I2S + HDMI platforms, this will lead to late_probe() fail and sound card not created issue on these platform. e.g. [ 5.034912] sof_rt5682 sof_rt5682: ASoC: sof-rt5682 late_probe() failed: -22 At the same time, the item CONFIG_SND_SOC_SOF_HDA_LINK is the more common one for HDMI as we suppose all HDA platforms will have HDMI at least. Switch to use this item for HDMI related controls building will fix the issue mentioned above. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
|
Hi @kv2019i this is marked with RFC as I am not sure if it is consistent with what you originally wanted to illustrate here, please help to review it. |
plbossart
left a comment
There was a problem hiding this comment.
I don't think this is correct
| } | ||
|
|
||
| #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) | ||
| #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_LINK) |
There was a problem hiding this comment.
the commit message states an incorrect fact. Look at the sound/soc/intel/boards/Kconfig and you'll see that even I2S machine drivers do rely on HDA_AUDIO_CODEC.
This is the default and it'd probably more that the Chrome configuration is incorrect.
|
@keyonjie @plbossart I had something else in mind. In the SOF Kconfig today we expect the HDA_LINK option to be selected for HDMI. Can we make the selection of HDA_AUDIO_CODEC automatic if HDA_LINK is selected? |
kv2019i
left a comment
There was a problem hiding this comment.
@keyonjie wrote:
Hi @kv2019i this is marked with RFC as I am not sure if it is consistent with what you originally wanted to illustrate here, please help to review it.
Not using HDA_LINK was intentional. The #ifdef'ed hda_dsp_hdmi_build_controls() calls function snd_hda_codec_build_controls() which is implemented in snd-hda-codec. So if the ifdef is changed, you will get errors from kconfigs where HDA_LINK is defined but HDA_AUDIO_CODEC not. I hit this during testing my patchset.
|
@ranj063 wrote:
Or just merge the two. Now that HDMI is just another HDA codec, I'm not sure whether we have any need for a separate HDA_LINK config option. If you look at current code, HDA_LINK is only used in board files to select the old hdac-hdmi. With common hdmi, HDMI goes through the same stack as other HDA codecs, so you need the same HDA stack in both cases. Do we have any other uses where HDA_LINK would be "yes" but HDA_AUDIO_CODEC still "no"? |
@ranj063 and I talked about having a pretend nocodec mode for HDaudio link DMAs. we haven't worked on it but I would like to avoid coupling the controller parts and the codec parts for now. |
@plbossart @kv2019i yes, I agree its better to keep them separate. But today for the nodec case HDA_LINK and NOCODEC options are mutually exclusive. This will likely change if we add the nocodec options for HDA codecs. But maybe we could select HDA_AUDIO_CODEC if HDA_LINK is selected and NOCODEC is not |
|
@plbossart wrote:
I understand the motivation, but it is confusing to have this abstraction in upstream with no actual use in code. E.g. I will forget your motivation in a month again and will be looking at the code again trying to figure why Ranjani and Pierre wanted to have LINK separate. ;) Anyways, if we stick to this, then I'd agree with @ranj063 proposal to enable HDA_AUDIO_CODEC automatically if HDA_LINK is selected. This would prevent any misconfiguration by users with current codebase. If and when the pretend-proxy support is added, this automatic enabling can be removed. Even better to mention this in the commit. Sounds good? |
|
Previously we had requirement to support HDMI for automotive with BSD license, that is HDMI + I2S, I think that's why the CONFIG_SND_SOC_SOF_HDA_LINK was added. What is the status with today's code about this? |
no, we never had such a requirement. it was for I2S only with the HDMI part explicitly disabled. |
|
btw we also have a similar issue with HDMI. in our kconfigs we use this: but some distros don't thesofproject/sof#2265 (comment) https://github.com/thesofproject/sof/files/4049160/default.txt |
|
So, @plbossart if the solution you preferred is to ask the distros themselves to make sure they should select the correct Kconfig items, please let me know, I will close this RFC here. |
@kv2019i should we select this CONFIG_SND_SOC_SOF_HDA_COMMON_HDMI_CODEC option directly in Kconfigs or should it remain an option? |
|
@plbossart wrote:
I'm still puzzled at how to handle this. We are already setting this as default: config SND_SOC_SOF_HDA_COMMON_HDMI_CODEC So distros should really pick this up already. The next step would be to remove the option altogether (or make it a tristate) and only offer ability to revert back to hdac-hdmi via the kernel module option. But as we did change the user-space interface, I'd prefer to leave distros with the choice still. We do need to fix the problem that SOF probe fails due to lack of HDMI. This is making this problem more severe now, but it needs to be fixed for other reasons as well (e.g. systems with IGFX disabled). |
|
Hi @kv2019i @plbossart are we aligned about how to proceed this? |
|
@keyonjie wrote:
I'm afraid not. It's true you can have invalid combinations of Kconfig settings now. This is hard to fix with machine drivers that could be used with either SST or SOF, so it gets really ugly to try to describe all dependencies so that if you select a specific machine driver, all dependencies it needs would be selected as well. We are not doing this for all features in any case ... e.g. you can select a SDW machine driver but not enable SDW in SOF, you won't get a functional audio stack. It would seem the best we can do, would be to make the machine drivers more robust against missing HDMI (like my #1731 for generic hda driver). This doesn't fix the problem of possible invalid Kconfig files, but at least SOF probe will not fail in case some SOF option is missed in Kconfig. If you have an invalid Kconfig combination, you won't get HDMI functionality, but other audio outputs will still work. |
…INK for hdmi
The config item CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC is originally
designed for HDA analog codec only, so it is not selected in I2S + HDMI
platforms, this will lead to late_probe() fail and sound card not
created issue on these platform. e.g.
[ 5.034912] sof_rt5682 sof_rt5682: ASoC: sof-rt5682 late_probe() failed: -22
At the same time, the item CONFIG_SND_SOC_SOF_HDA_LINK is the more
common one for HDMI as we suppose all HDA platforms will have HDMI at
least. Switch to use this item for HDMI related controls building will
fix the issue mentioned above.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com