[alsa-devel] simple-card: DAI link creation
Hello Morimoto-san,
I want to know your opinion on enhancing simple-card in order to be able to create more flexible links.
So far, simple-card allows the following cases:
1) normal sound
all DAIs are detected as CPU - Codec (+optional platform).
2) DPCM sound
2a) all CPUs are detected CPU - <dummy_codec> [FE] 2b) all codecs are detected <dummy_cpu> - codec [BE]
I will need to have a third case where I need to create a back end link like this:
link->cpus->of_node = <&my_dai>; link->codecs->of_node = <&my_codec>; link->platforms->of_node = <&my_platform>; link->no_pcm = 1;
Somehow, similar with qcom_snd_parse_of from sound/soc/qcom/common.c.
Do you think it would be OK to create another file to handle this case in sound/soc/generic?
Also, I would really like one day to really understand the role of cpu/platform/codec for a FE/BE.
In the case of the FE: - cpu dai - platform - codec, here it makes sense to be dummy codec.
In the case of BE: - cpu_dai - platform - codec, here it make sense to be reference to a real codec
In the case of normal link: - cpu_dai, here it makes sense is a physical DAI - platform - codec, here it makes sense it is a physical codec.
thanks, Daniel.
Hi Daniel
Thank you for contacting me
link->cpus->of_node = <&my_dai>; link->codecs->of_node = <&my_codec>; link->platforms->of_node = <&my_platform>; link->no_pcm = 1;
Somehow, similar with qcom_snd_parse_of from sound/soc/qcom/common.c.
Do you think it would be OK to create another file to handle this case in sound/soc/generic?
Or having extra flag for it ?
static const struct of_device_id simple_of_match[] = { { .compatible = "simple-audio-card", }, { .compatible = "simple-scu-audio-card", .data = (void *)DPCM_SELECTABLE }, + { .compatible = "simple-xxx-audio-card", + .data = (void *)DPCM_WITH_PLATFORM }, {}, };
This idea is adding new feature on simple-card. But, in sound card case, many patterns exist, thus, adding new feature into simple-card will be difficult.
So having new file is not bad idea. But, I'm thinking some Card driver want to create new driver, but want to share simple-card code. Actually, simple-card-utils.c is for it. But, maybe someone want to share simple-card.c code itself ?
Some overwrite technic can be nice idea.
# Now I'm focusing cleanup ALSA SoC # Current framework has "normal sound" and "DPCM sound", # and it makes code/DT difficult. # But if all cleanup could be done, these can be merged, # and can have more flexible connection. # Then, I want to create new simple-card with *really* simple code :)
Thank you for your help !! Best regards --- Kuninori Morimoto
participants (2)
-
Daniel Baluta
-
Kuninori Morimoto