Other Parts Discussed in Thread: TAS5805, TAS2781
Tool/software:
I'm building a Raspberry Pi Hat with two TAS5805M DACs connected in a 2.1 master/slave configuration. The schematics I'm using are very close to the datasheet recommendation and are available here. The problem I'm having is building the right device tree for that Hat for Raspbian.
I started with a Raspberry Pi Hat having a single TAS5805M DAC and the driver implementation from this thread. I made a few adjustments to make it build for latest kernel version and with the device tree that can be found here it work beatifully!
Now I'm trying to add a second DAC but failing to make it work. The closest I got is this device tree that spins up the master DAC with TAS5805M driver and it plays audio as expected.
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&i2s>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&i2c1>;
__overlay__ {
status = "okay";
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;
tas5805m_master: tas5805m@2e {
#sound-dai-cells = <0>;
compatible = "ti,tas5805m";
reg = <0x2e>;
pvdd-supply = <&vdd_3v3_reg>;
pdn-gpios = <&gpio 4 0>;
ti,dsp-config-name = "2.0_basic";
sound-name-prefix = "Main";
};
tas5805m_slave: tas5805m@2f {
#sound-dai-cells = <0>;
compatible = "ti,tas5805m";
reg = <0x2f>;
pvdd-supply = <&vdd_3v3_reg>;
pdn-gpios = <&gpio 5 0>;
ti,dsp-config-name = "1.0_basic";
sound-name-prefix = "Woofer";
};
};
};
fragment@2 {
target = <&sound>;
__overlay__ {
status = "okay";
compatible = "simple-audio-card";
label = "Louder-Raspberry-2X";
simple-audio-card,widgets =
"Speaker", "Speaker";
simple-audio-card,routing =
"Speaker", "Main OUTA",
"Speaker", "Main OUTB";
// "Speaker", "Woofer OUTA",
// "Speaker", "Woofer OUTB";
simple-audio-card,dai-link {
format = "i2s";
bitclock-master = <&dailink_master>;
frame-master = <&dailink_master>;
dailink_master: simple-audio-card,cpu {
sound-dai = <&i2s>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
codec@0 {
sound-dai = <&tas5805m_master>;
};
// codec@1 {
// sound-dai = <&tas5805m_slave>;
// };
};
};
};
};
But as soon as I comment out codec@1
section and corresponding routing
section, it spits an error on initialization
Apr 15 17:51:25 lab-louder-pi-04 kernel: tas5805m-amplifier-tas5805m-amplifier: substream tas5805m-amplifier-tas5805m-amplifier has no playback, no capture
Apr 15 17:51:25 lab-louder-pi-04 kernel: asoc-simple-card soc:sound: ASoC: can't create pcm tas5805m-amplifier-tas5805m-amplifier :-22
Apr 15 17:51:25 lab-louder-pi-04 kernel: asoc-simple-card: probe of soc:sound failed with error -22