You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 4 ways used to read/write HDA registers in current code,
1: the HDA lib code with prefix snd_hdac_ head macro defines
2: the HDA lib code with prefix snd_hdac_ in C files
3: the SOF defined function with prefix snd_sof_dsp_
4: directly read/write the registers
Currently, the 4 ways are all used in the code, we need to simplify this to make the read/write consistence, to make code more readable.
Some discussions are already in #877.
From Pierre:
if SND_SOC_SOF_HDA is not defined, we shall not use any code from the hdac library. We may use structures from include files (as done for streams).
If SND_SOC_SOF_HDA is defined, we may use code from the hdac library, but if we already have code in SOF we should be consistent and use this only. In other words, the SOF code is trying to be self-contained and use the hdac library only if strictly necessary
From Keyon:
we should use snd_hdac_() version in all possible places, as those snd_hdac_() are all headers only, the io_ops implementation is in our hda_bus.c.
As we aligned before SOF HDA/HDMI implemented last year, we came out to that we can use hdac library header files for both I2S(BSD) and HDA/HDMI(GPL), since we have already used snd_hdac_() inside hdac library(during invoking hdac APIs), so I suggest changing to use this unified interface in our sof hda related registers read/write operations, for both I2S and HDA/HDMI cases
I don't understand @keyonjie 's proposal. It makes no sense to re-implement the same functions with a different license, it's completely unmaintainable.
"Hi @plbossart IMHO, we should use snd_hdac_() version in all possible places, as those snd_hdac_() are all headers only, the io_ops implementation is in our hda_bus.c.
As we aligned before SOF HDA/HDMI implemented last year, we came out to that we can use hdac library header files for both I2S(BSD) and HDA/HDMI(GPL), since we have already used snd_hdac_() inside hdac library(during invoking hdac APIs), so I suggest changing to use this unified interface in our sof hda related registers read/write operations, for both I2S and HDA/HDMI cases."
Activity
plbossart commentedon May 14, 2019
I don't understand @keyonjie 's proposal. It makes no sense to re-implement the same functions with a different license, it's completely unmaintainable.
zhuyingjiang commentedon May 15, 2019
@lgirdwood Could you provide your comments. Or I will mark this as won't fix.
plbossart commentedon May 15, 2019
how about @keyonjie explains his views? It's not very helpful to have a one-way conversation.
mengdonglin commentedon May 16, 2019
Paste @keyonjie 's previous comments for further discussion:
#877 (comment)
"Hi @plbossart IMHO, we should use snd_hdac_() version in all possible places, as those snd_hdac_() are all headers only, the io_ops implementation is in our hda_bus.c.
As we aligned before SOF HDA/HDMI implemented last year, we came out to that we can use hdac library header files for both I2S(BSD) and HDA/HDMI(GPL), since we have already used snd_hdac_() inside hdac library(during invoking hdac APIs), so I suggest changing to use this unified interface in our sof hda related registers read/write operations, for both I2S and HDA/HDMI cases."
plbossart commentedon May 16, 2019
@keyonjie are you seriously recommending using the same interface with TWO implementations using TWO licenses?
staging: vme_user: Fix checkpatch warnings in vme_tsi148.c