fsl-asoc-card currently doesn't support generic codecs with the SoC
acting as I2S slave.
This commit adds a new `fsl,imx-audio-i2s-slave` for this use-case, as
well as the following mandatory properties:
- `audio-codec-dai-name` for specifying the codec DAI to be used
- `audio-slot-width`
Signed-off-by: Arnaud Ferraris <[email protected]>
---
.../bindings/sound/fsl-asoc-card.txt | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
index 133d7e14a4d0..694a138df462 100644
--- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
@@ -22,6 +22,8 @@ Note: The card is initially designed for those sound cards who use AC'97, I2S
The compatible list for this generic sound card currently:
"fsl,imx-audio-ac97"
+ "fsl,imx-audio-i2s-slave"
+
"fsl,imx-audio-cs42888"
"fsl,imx-audio-cs427x"
@@ -75,7 +77,13 @@ Optional unless SSI is selected as a CPU DAI:
- mux-ext-port : The external port of the i.MX audio muxer
-Example:
+Optional unless compatible is "fsl,imx-audio-i2s-slave":
+
+ - audio-codec-dai-name: The name of the DAI provided by the codec
+
+ - audio-slot-width : The audio sample format
+
+Examples:
sound-cs42888 {
compatible = "fsl,imx-audio-cs42888";
model = "cs42888-audio";
@@ -96,3 +104,16 @@ sound-cs42888 {
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
};
+
+sound-bluetooth {
+ compatible = "fsl,imx-audio-i2s-slave";
+ audio-cpu = <&ssi1>;
+ audio-codec = <&codec_bluetooth>;
+ audio-codec-dai-name = "bt-sco-pcm-wb";
+ audio-slot-width = <16>;
+ audio-routing =
+ "RX", "Mic Jack",
+ "Headphone Jack", "TX";
+ mux-int-port = <1>;
+ mux-ext-port = <4>;
+};
--
2.27.0
On Thu, Jul 02, 2020 at 04:11:14PM +0200, Arnaud Ferraris wrote:
> fsl-asoc-card currently doesn't support generic codecs with the SoC
> acting as I2S slave.
>
> This commit adds a new `fsl,imx-audio-i2s-slave` for this use-case, as
> well as the following mandatory properties:
Why require that the CODEC be clock master here - why not make this
configurable, reusing the properties from the generic and audio graph
cards?
Hi Mark,
Le 02/07/2020 ? 16:31, Mark Brown a ?crit?:
> On Thu, Jul 02, 2020 at 04:11:14PM +0200, Arnaud Ferraris wrote:
>> fsl-asoc-card currently doesn't support generic codecs with the SoC
>> acting as I2S slave.
>>
>> This commit adds a new `fsl,imx-audio-i2s-slave` for this use-case, as
>> well as the following mandatory properties:
>
> Why require that the CODEC be clock master here - why not make this
> configurable, reusing the properties from the generic and audio graph
> cards?
This is partly because I'm not sure how to do it (yet), but mostly
because I don't have the hardware to test this (the 2 CODECs present on
my only i.MX6 board are both clock master)
Regards,
Arnaud
On Thu, Jul 02, 2020 at 05:28:03PM +0200, Arnaud Ferraris wrote:
> Le 02/07/2020 ? 16:31, Mark Brown a ?crit?:
> > Why require that the CODEC be clock master here - why not make this
> > configurable, reusing the properties from the generic and audio graph
> > cards?
> This is partly because I'm not sure how to do it (yet), but mostly
> because I don't have the hardware to test this (the 2 CODECs present on
> my only i.MX6 board are both clock master)
Take a look at what the generic cards are doing, it's a library function
asoc_simple_parse_daifmt(). It's not the end of the world if you can't
test it properly - if it turns out it's buggy somehow someone can always
fix the code later but an ABI is an ABI so we can't change it.
Le 02/07/2020 ? 17:42, Mark Brown a ?crit?:
> On Thu, Jul 02, 2020 at 05:28:03PM +0200, Arnaud Ferraris wrote:
>> Le 02/07/2020 ? 16:31, Mark Brown a ?crit?:
>
>>> Why require that the CODEC be clock master here - why not make this
>>> configurable, reusing the properties from the generic and audio graph
>>> cards?
>
>> This is partly because I'm not sure how to do it (yet), but mostly
>> because I don't have the hardware to test this (the 2 CODECs present on
>> my only i.MX6 board are both clock master)
>
> Take a look at what the generic cards are doing, it's a library function
> asoc_simple_parse_daifmt(). It's not the end of the world if you can't
> test it properly - if it turns out it's buggy somehow someone can always
> fix the code later but an ABI is an ABI so we can't change it.
>
Thanks for the hints, I'll look into it.
Regards,
Arnaud