ALSA issue when using simple-audio-card and ssc0 with SSM3582 codec

Moderator: nferre

CortexAlex
Posts: 13
Joined: Thu Jan 26, 2017 12:48 pm

ALSA issue when using simple-audio-card and ssc0 with SSM3582 codec

Fri Jan 26, 2018 12:10 pm

hello,

basically, I want to use the simple-audio-card module in i2s mode with the SSM3582 codec. I created my own codec module. It gets registered just fine and I can read the chip id code via i2c so this part is good. However, when loading, the simple-card module keeps failing with a parsing error related to the cpu definition, especially the #sound-dai-cells = <0>; part. I believe I have my dts file right according to the LInux documentations (mainly simple-card.txt) and other examples I found in the Linux source tree so I don't think this is actually coming from my dts file but rather from the fact that I am using the simple-audio-card with atmel-ssc, especially after getting across that patch described here https://patchwork.kernel.org/patch/9475979/. For testing, I tried removing the #sound-dai-cells entry, as well as using #sound-dai-cells = <1>; with no luck obviously.

Is that patch required to get this to work ? I'll try it locally anyways to be sure in a few minutes.

As a generic question, how can I tell if it is already merged into Linux4sam-5.7 ?

I know the alternative would be to write a custom platform module and I already did that but I don't feel this is the proper way to handle the issue.

I posted below the parts of the boot log and parts of the dts file that I modified.
[ 3.664000] ALSA device list:
[ 3.665000] No soundcards found.
...
[ 5.126000] ssc f8008000.ssc: Atmel SSC device at 0xe0cc8000 (irq 24)
...
[ 5.246000] snd-soc-dummy snd-soc-dummy: codec register snd-soc-dummy
[ 5.247000] snd-soc-dummy snd-soc-dummy: ASoC: dai register snd-soc-dummy #1
[ 5.249000] snd-soc-dummy snd-soc-dummy: ASoC: dynamically register DAI snd-soc-dummy
[ 5.250000] snd-soc-dummy snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai'
[ 5.251000] snd-soc-dummy snd-soc-dummy: ASoC: Registered codec 'snd-soc-dummy'
[ 5.252000] snd-soc-dummy snd-soc-dummy: ASoC: platform register snd-soc-dummy
[ 5.253000] snd-soc-dummy snd-soc-dummy: ASoC: Registered platform 'snd-soc-dummy'
...
[ 5.307000] ssm3582_i2c_probe start
[ 5.308000] ssm3582 0-0010: devm_regmap_init_i2c done
[ 5.319000] ssm3582 0-0010: regmap_write done
[ 5.320000] ssm3582_set_power down done
[ 5.321000] ssm3582 0-0010: ssm3582: vendor 0x41
[ 5.322000] ssm3582 0-0010: ssm3582: deviceId1 0x35
[ 5.323000] ssm3582 0-0010: ssm3582: deviceId2 0x82
[ 5.324000] ssm3582 0-0010: ssm3582: revision 0x1
[ 5.325000] ssm3582 0-0010: codec register 0-0010
[ 5.326000] ssm3582 0-0010: ASoC: dai register 0-0010 #1
[ 5.328000] ssm3582 0-0010: ASoC: dynamically register DAI 0-0010
[ 5.329000] ssm3582 0-0010: ASoC: Registered DAI 'ssm3582-hifi'
[ 5.330000] ssm3582 0-0010: ASoC: Registered codec 'ssm3582.0-0010'
[ 5.331000] ssm3582 0-0010: snd_soc_register_codec done
[ 5.370000] input: gpio_keys as /devices/platform/gpio_keys/input/input1
[ 5.413000] asoc_simple_card_probe
[ 5.414000] asoc-simple-card sound: link 0:
[ 5.415000] asoc_simple_card_parse_dai ERROR: snd_soc_of_get_dai_name: cells_name=#sound-dai-cells
[ 5.416000] asoc_simple_card_dai_link_of ERROR: asoc_simple_card_parse_cpu
[ 5.417000] asoc_simple_card_parse_of ERROR: MULTI: asoc_simple_card_dai_link_of
[ 5.418000] asoc_simple_card_probe ERROR: EPROBE_DEFER
[ 5.419000] asoc_simple_card_probe ERROR
{
ahb {
apb {
....
i2c0: i2c@f8014000 {
status = "okay";
ssm3582: ssm3582@10 {
compatible = "adi,ssm3582";
#sound-dai-cells = <0>;
reg = <0x10>;
};
};
....
ssc0: ssc@f8008000 {
#sound-dai-cells = <0>;
clocks = <&pck0>;
status = "okay";
};
};
};
....
sound {
compatible = "simple-audio-card";
status = "okay";
simple-audio-card,name = "ssm3582-audio";

simple-audio-card,dai-link@0 {
format = "i2s";
mclk-fs = <256>;

cpu {
sound-dai = <&ssc0>;
};
codec {
sound-dai = <&ssm3582>;
};
};
};
}

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 14 guests