Re: [alsa-devel] [PATCH 8/8] ASoC: add snd-soc-dummy DT support
Hi Lars
Thank you for your comment
sound { compatible = "simple-audio-card";
/* FrontEnd */ simple-audio-card,dai-link@0 { ... format = "left_j"; remote = <&endpoint>; cpu { sound-dai = <&rcar_sound 0>; }; codec { /* dummy */ }; }; /* BackEnd */ endpoint: simple-audio-card,dai-link@1 { ... format = "left_j"; cpu { /* dummy */ }; codec1: codec { sound-dai = <&ak4643>; }; };
};
When you try to come up with with a binding try to completely ignore that something call DPCM exists. The binding is supposed to describe the hardware and how the different hardware components are interconnected. So try to come up with a binding that accurately describes the hardware connections. Once that is done try to map the binding onto the existing software framework. The last step may require some adjustments to the framework.
Now, my system is working well with simple-card by this
sound { compatible = "simple-audio-card"; ...
cpu { sound-dai = <&rcar_sound 0>; }; codec { sound-dai = <&ak4643>; }; };
The reason why I'm tring to support DPCM on simple-card is "sampling rate convert". My rcar_sound can convert sampling rate, and I tried to add this feature as rcar_sound property. But, Mark rejected and requests me to use DPCM for it, since it can be common featrue. Current existing simple-card can't use it, and I'm tring. But, am I misunderstanding ?
Best regards --- Kuninori Morimoto
On 08/28/2014 02:33 AM, Kuninori Morimoto wrote:
Hi Lars
Thank you for your comment
sound { compatible = "simple-audio-card";
/* FrontEnd */ simple-audio-card,dai-link@0 { ... format = "left_j"; remote = <&endpoint>; cpu { sound-dai = <&rcar_sound 0>; }; codec { /* dummy */ }; }; /* BackEnd */ endpoint: simple-audio-card,dai-link@1 { ... format = "left_j"; cpu { /* dummy */ }; codec1: codec { sound-dai = <&ak4643>; }; };
};
When you try to come up with with a binding try to completely ignore that something call DPCM exists. The binding is supposed to describe the hardware and how the different hardware components are interconnected. So try to come up with a binding that accurately describes the hardware connections. Once that is done try to map the binding onto the existing software framework. The last step may require some adjustments to the framework.
Now, my system is working well with simple-card by this
sound { compatible = "simple-audio-card"; ...
cpu { sound-dai = <&rcar_sound 0>; }; codec { sound-dai = <&ak4643>; };
};
The reason why I'm tring to support DPCM on simple-card is "sampling rate convert". My rcar_sound can convert sampling rate, and I tried to add this feature as rcar_sound property. But, Mark rejected and requests me to use DPCM for it, since it can be common featrue. Current existing simple-card can't use it, and I'm tring. But, am I misunderstanding ?
Is the sample rate converter a extra module, or is the sample rate converter just a feature of the I2S core?
- Lars
Hi Lars
The reason why I'm tring to support DPCM on simple-card is "sampling rate convert". My rcar_sound can convert sampling rate, and I tried to add this feature as rcar_sound property. But, Mark rejected and requests me to use DPCM for it, since it can be common featrue. Current existing simple-card can't use it, and I'm tring. But, am I misunderstanding ?
Is the sample rate converter a extra module, or is the sample rate converter just a feature of the I2S core?
Does this "I2S core" = CPU ? Then, it is CPU's feature. The image is like this
48kHz ---> 48kHz 44.1kHz ---> [CPU] ---> [codec] 96kHz --->
On Wed, Aug 27, 2014 at 05:33:55PM -0700, Kuninori Morimoto wrote:
Now, my system is working well with simple-card by this
sound { compatible = "simple-audio-card"; ...
cpu { sound-dai = <&rcar_sound 0>; }; codec { sound-dai = <&ak4643>; };
};
The reason why I'm tring to support DPCM on simple-card is "sampling rate convert". My rcar_sound can convert sampling rate, and I tried to add this feature as rcar_sound property. But, Mark rejected and requests me to use DPCM for it, since it can be common featrue. Current existing simple-card can't use it, and I'm tring. But, am I misunderstanding ?
There's two separate things here. One is how the code is implemented (which does look very much like it should be doing DPCM) and the other is how the DT binding looks - the DT binding is supposed to be a hardware neutral thing and not depend on Linux implementation details. If you've already got the hardware described well enough to discover everything then that generally indicates that the DT binding should not need to change.
Hi
sound { compatible = "simple-audio-card"; ...
cpu { sound-dai = <&rcar_sound 0>; }; codec { sound-dai = <&ak4643>; };
};
(snip)
There's two separate things here. One is how the code is implemented (which does look very much like it should be doing DPCM) and the other is how the DT binding looks - the DT binding is supposed to be a hardware neutral thing and not depend on Linux implementation details. If you've already got the hardware described well enough to discover everything then that generally indicates that the DT binding should not need to change.
In my case, I need DPCM if CPU want to use "sampling rate convert", otherwise, I don't need it. So, DPCM <-> non DPCM switching happen if DTS has sampling-rate-convert = <xxxxxxx> or something like that. Does my understanding correct ?
Hi Mark, Lars
sound { compatible = "simple-audio-card"; ...
cpu { sound-dai = <&rcar_sound 0>; }; codec { sound-dai = <&ak4643>; };
};
(snip)
There's two separate things here. One is how the code is implemented (which does look very much like it should be doing DPCM) and the other is how the DT binding looks - the DT binding is supposed to be a hardware neutral thing and not depend on Linux implementation details. If you've already got the hardware described well enough to discover everything then that generally indicates that the DT binding should not need to change.
In my case, I need DPCM if CPU want to use "sampling rate convert", otherwise, I don't need it. So, DPCM <-> non DPCM switching happen if DTS has sampling-rate-convert = <xxxxxxx> or something like that. Does my understanding correct ?
I re-considered about above, and checked current code. If my above understanding was correct, simple-card driver needs many patches to support it. And, it is not easy
I want to synchronize basic agreement before starting it. Otherwise, it is easy to reject my many weeks work, and I don't want it. # 1st simple-card DT support used 1 year...
My understanding is below. It is good match for my current purpose, and "sampling-rate-convert feature via DPCM" can be standard on simple-card. My concern is simple card code will be not simple...
-- non DPCM ----
sound { compatible = "simple-audio-card"; ... cpu { sound-dai = <&cpu-dai>; }; codec { sound-dai = <&codec-dai>; }; };
same as current style
-- DPCM ----
sound { compatible = "simple-audio-card"; ... cpu { sound-dai = <&cpu-dai>; }; codec { sound-dai = <&codec-dai>; fixed-sampling-rate = <44100>; }; };
DPCM FE/BE will be
FE cpu : cpu-dai codec : dummy
BE cpu : dummy codec : codec-dai
required route will be created automatically but, it needs "enable DAI name on DAPM route" method anyway
participants (3)
-
Kuninori Morimoto
-
Lars-Peter Clausen
-
Mark Brown