add devicetree overlay for i2s and asound.conf
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -46,3 +46,6 @@ src/auracast/server/certs/ca/ca_cert.srl
|
|||||||
src/auracast/server/credentials.json
|
src/auracast/server/credentials.json
|
||||||
pcm1862-i2s.dtbo
|
pcm1862-i2s.dtbo
|
||||||
test.wav
|
test.wav
|
||||||
|
both.wav
|
||||||
|
vin1.wav
|
||||||
|
vin2.wav
|
||||||
|
|||||||
39
src/misc/asound.conf
Normal file
39
src/misc/asound.conf
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# --- raw HW by card ID (no sharing) ---
|
||||||
|
pcm.adc_hw_stereo {
|
||||||
|
type hw
|
||||||
|
card "i2s" # from `arecord -l`: card 2: i2s [pcm1862 on i2s]
|
||||||
|
device 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- mono splits (do the routing here) ---
|
||||||
|
pcm.adc_in1 {
|
||||||
|
type route
|
||||||
|
slave.pcm "adc_hw_stereo"
|
||||||
|
slave.channels 2
|
||||||
|
ttable.0.0 1.0 # left -> mono
|
||||||
|
ttable.1.0 0.0
|
||||||
|
}
|
||||||
|
|
||||||
|
pcm.adc_in2 {
|
||||||
|
type route
|
||||||
|
slave.pcm "adc_hw_stereo"
|
||||||
|
slave.channels 2
|
||||||
|
ttable.0.0 0.0
|
||||||
|
ttable.1.0 1.0 # right -> mono
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- diagnostics: exact slot taps (bypass any sharing/conversion) ---
|
||||||
|
pcm.adc_ch0 {
|
||||||
|
type route
|
||||||
|
slave.pcm "adc_hw_stereo"
|
||||||
|
slave.channels 2
|
||||||
|
ttable.0.0 1.0
|
||||||
|
ttable.1.0 0.0
|
||||||
|
}
|
||||||
|
pcm.adc_ch1 {
|
||||||
|
type route
|
||||||
|
slave.pcm "adc_hw_stereo"
|
||||||
|
slave.channels 2
|
||||||
|
ttable.0.0 0.0
|
||||||
|
ttable.1.0 1.0
|
||||||
|
}
|
||||||
1
src/misc/install_asoundconf.sh
Normal file
1
src/misc/install_asoundconf.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sudo cp src/misc/asound.conf /etc/asound.conf
|
||||||
@@ -7,24 +7,28 @@
|
|||||||
/* Enable the I²S controller */
|
/* Enable the I²S controller */
|
||||||
fragment@0 {
|
fragment@0 {
|
||||||
target = <&i2s>;
|
target = <&i2s>;
|
||||||
__overlay__ { status = "okay"; };
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* PCM1862 on I2C1 at 0x4a */
|
/* PCM1862 on I2C1 at 0x4a (change if your bus/address differ) */
|
||||||
fragment@1 {
|
fragment@1 {
|
||||||
target = <&i2c1>;
|
target = <&i2c1>;
|
||||||
__overlay__ {
|
__overlay__ {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
pcm1862: adc@4a {
|
pcm1862: adc@4a {
|
||||||
compatible = "ti,pcm1862";
|
compatible = "ti,pcm1862";
|
||||||
reg = <0x4a>;
|
reg = <0x4a>;
|
||||||
#sound-dai-cells = <0>;
|
#sound-dai-cells = <0>;
|
||||||
|
/* Rails are hard-powered on your board, so no regulators here */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Link bcm2835-i2s <-> pcm1862 with simple-audio-card */
|
/* Link bcm2835-i2s <-> pcm1862 via simple-audio-card */
|
||||||
fragment@2 {
|
fragment@2 {
|
||||||
target-path = "/";
|
target-path = "/";
|
||||||
__overlay__ {
|
__overlay__ {
|
||||||
|
|||||||
Reference in New Issue
Block a user