Skip to content

Commit b62e405

Browse files
Raashid Muhammedpopcornmix
Raashid Muhammed
authored andcommitted
Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi.
The Piano DAC 2.1 has support for 4 channels with subwoofer. Signed-off-by: Baswaraj K <[email protected]> Reviewed-by: Vijay Kumar B. <[email protected]> Reviewed-by: Raashid Muhammed <[email protected]>
1 parent b8c87fc commit b62e405

File tree

6 files changed

+546
-0
lines changed

6 files changed

+546
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
88
ads7846.dtbo \
99
akkordion-iqdacplus.dtbo \
1010
allo-piano-dac-pcm512x-audio.dtbo \
11+
allo-piano-dac-plus-pcm512x-audio.dtbo \
1112
at86rf233.dtbo \
1213
audioinjector-addons.dtbo \
1314
audioinjector-wm8731-audio.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,24 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec
283283
that does not result in clipping/distortion!)
284284

285285

286+
Name: allo-piano-dac-plus-pcm512x-audio
287+
Info: Configures the Allo Piano DAC (2.1) audio cards.
288+
Load: dtoverlay=allo-piano-dac-plus-pcm512x-audio,<param>
289+
Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec
290+
Digital volume control.
291+
(The default behaviour is that the Digital
292+
volume control is limited to a maximum of
293+
0dB. ie. it can attenuate but not provide
294+
gain. For most users, this will be desired
295+
as it will prevent clipping. By appending
296+
the 24db_digital_gain parameter, the Digital
297+
volume control will allow up to 24dB of
298+
gain. If this parameter is enabled, it is the
299+
responsibility of the user to ensure that
300+
the Digital volume control is set to a value
301+
that does not result in clipping/distortion!)
302+
303+
286304
Name: at86rf233
287305
Info: Configures the Atmel AT86RF233 802.15.4 low-power WPAN transceiver,
288306
connected to spi0.0
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Definitions for Piano DAC
2+
/dts-v1/;
3+
/plugin/;
4+
5+
/ {
6+
compatible = "brcm,bcm2708";
7+
8+
fragment@0 {
9+
target = <&i2s>;
10+
__overlay__ {
11+
status = "okay";
12+
};
13+
};
14+
15+
fragment@1 {
16+
target = <&i2c1>;
17+
__overlay__ {
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
status = "okay";
21+
22+
pcm5122_4c: pcm5122@4c {
23+
#sound-dai-cells = <0>;
24+
compatible = "ti,pcm5122";
25+
reg = <0x4c>;
26+
status = "okay";
27+
};
28+
pcm5122_4d: pcm5122@4d {
29+
#sound-dai-cells = <0>;
30+
compatible = "ti,pcm5122";
31+
reg = <0x4d>;
32+
status = "okay";
33+
};
34+
};
35+
};
36+
37+
fragment@2 {
38+
target = <&sound>;
39+
piano_dac: __overlay__ {
40+
compatible = "allo,piano-dac-plus";
41+
audio-codec = <&pcm5122_4c &pcm5122_4d>;
42+
i2s-controller = <&i2s>;
43+
status = "okay";
44+
};
45+
};
46+
47+
__overrides__ {
48+
24db_digital_gain =
49+
<&piano_dac>,"piano,24db_digital_gain?";
50+
};
51+
};

sound/soc/bcm/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ config SND_BCM2708_SOC_ALLO_PIANO_DAC
162162
help
163163
Say Y or M if you want to add support for Allo Piano DAC.
164164

165+
config SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS
166+
tristate "Support for Allo Piano DAC Plus"
167+
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
168+
select SND_SOC_PCM512x_I2C
169+
help
170+
Say Y or M if you want to add support for Allo Piano DAC Plus.
171+
165172
config SND_BCM2708_SOC_FE_PI_AUDIO
166173
tristate "Support for Fe-Pi-Audio"
167174
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S

sound/soc/bcm/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o
3232
snd-soc-dionaudio-loco-objs := dionaudio_loco.o
3333
snd-soc-dionaudio-loco-v2-objs := dionaudio_loco-v2.o
3434
snd-soc-allo-piano-dac-objs := allo-piano-dac.o
35+
snd-soc-allo-piano-dac-plus-objs := allo-piano-dac-plus.o
3536
snd-soc-pisound-objs := pisound.o
3637
snd-soc-fe-pi-audio-objs := fe-pi-audio.o
3738

@@ -56,5 +57,6 @@ obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o
5657
obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o
5758
obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2) += snd-soc-dionaudio-loco-v2.o
5859
obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o
60+
obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS) += snd-soc-allo-piano-dac-plus.o
5961
obj-$(CONFIG_SND_PISOUND) += snd-soc-pisound.o
6062
obj-$(CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO) += snd-soc-fe-pi-audio.o

0 commit comments

Comments
 (0)