-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hey folks, I'm building a Raspberry Pi Hat that uses two TAS5805M DACs connected in a 2.1 master/slave configuration. The schematics I'm using are very close to the setup of the OtterCastAmp, with the key difference of using TAS5805M DAC instead of TAS5825M. The I2C addresses are different, but the rest are the same.
The problem I'm having is building the right device tree for that Hat for Raspbian. I started with my own tas5805m driver and tried to implement it similar way to the way you guys did in your dts and driver patch. Currently I'm trying to use your code with minimal adjustments for Raspberry but failing.
The closest I got is this device tree that spins up the master DAC with TAS5825M driver.
/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>;
tas5825m_master: tas5825m@2e {
#sound-dai-cells = <0>;
compatible = "ti,tas5825m";
reg = <0x2e>;
pvdd-supply = <&vdd_3v3_reg>;
pdn-gpios = <&gpio 4 0>;
ti,dsp-config-name = "2.0_basic";
sound-name-prefix = "Main";
};
tas5825m_slave: tas5825m@2f {
#sound-dai-cells = <0>;
compatible = "ti,tas5825m";
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 = <&tas5825m_master>;
};
// codec@1 {
// sound-dai = <&tas5825m_slave>;
// };
};
};
};
};
But as soon as I comment out codec@1
section and corresponding routing
section, it spits an error on initialisation
Apr 15 17:51:25 lab-louder-pi-04 kernel: tas5825m-amplifier-tas5825m-amplifier: substream tas5825m-amplifier-tas5825m-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 tas5825m-amplifier-tas5825m-amplifier :-22
Apr 15 17:51:25 lab-louder-pi-04 kernel: asoc-simple-card: probe of soc:sound failed with error -22
I was hoping that you might see what am I doing wrong, or at least confirm that the configuration I found in your repo is something that is actually working for you, do give me confidence that I'm on the right path