Skip to content

Commit 98ac9b8

Browse files
j-schambacherpelwell
authored andcommitted
DT-overlays: adds support for Hifiberry AMP4 Pro
The AMP4 Pro uses a TI TAS5756 amplifier in master mode and requires the DAC Plus card driver and the pcm512x component driver with TAS support. Signed-off-by: Joerg Schambacher <[email protected]>
1 parent d58c054 commit 98ac9b8

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
8686
hifiberry-amp.dtbo \
8787
hifiberry-amp100.dtbo \
8888
hifiberry-amp3.dtbo \
89+
hifiberry-amp4pro.dtbo \
8990
hifiberry-dac.dtbo \
9091
hifiberry-dacplus.dtbo \
9192
hifiberry-dacplusadc.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,34 @@ Load: dtoverlay=hifiberry-amp3
17381738
Params: <None>
17391739

17401740

1741+
Name: hifiberry-amp4pro
1742+
Info: Configures the HifiBerry AMP4 Pro audio card
1743+
Load: dtoverlay=hifiberry-amp4pro,<param>=<val>
1744+
Params: 24db_digital_gain Allow gain to be applied via the TAS5756
1745+
Digital volume control. Enable with
1746+
"dtoverlay=hifiberry-amp4pro,24db_digital_gain"
1747+
(The default behaviour is that the Digital
1748+
volume control is limited to a maximum of
1749+
0dB. ie. it can attenuate but not provide
1750+
gain. For most users, this will be desired
1751+
as it will prevent clipping. By appending
1752+
the 24dB_digital_gain parameter, the Digital
1753+
volume control will allow up to 24dB of
1754+
gain. If this parameter is enabled, it is the
1755+
responsibility of the user to ensure that
1756+
the Digital volume control is set to a value
1757+
that does not result in clipping/distortion!)
1758+
slave Force the amp into slave mode, using Pi as
1759+
master for bit clock and frame clock.
1760+
leds_off If set to 'true' the onboard indicator LEDs
1761+
are switched off at all times.
1762+
auto_mute If set to 'true' the amplifier is automatically
1763+
muted when it is not playing.
1764+
mute_ext_ctl The amplifier's HW mute control is enabled
1765+
in ALSA mixer and set to <val>.
1766+
Will be overwritten by ALSA user settings.
1767+
1768+
17411769
Name: hifiberry-dac
17421770
Info: Configures the HifiBerry DAC audio cards
17431771
Load: dtoverlay=hifiberry-dac
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Definitions for HiFiBerry AMP4PRO
2+
/dts-v1/;
3+
/plugin/;
4+
#include <dt-bindings/gpio/gpio.h>
5+
6+
/ {
7+
compatible = "brcm,bcm2835";
8+
9+
fragment@0 {
10+
target-path = "/";
11+
__overlay__ {
12+
dacpro_osc: dacpro_osc {
13+
compatible = "hifiberry,dacpro-clk";
14+
#clock-cells = <0>;
15+
};
16+
};
17+
};
18+
19+
frag1: fragment@1 {
20+
target = <&i2s_clk_consumer>;
21+
__overlay__ {
22+
status = "okay";
23+
};
24+
};
25+
26+
fragment@2 {
27+
target = <&i2c1>;
28+
__overlay__ {
29+
#address-cells = <1>;
30+
#size-cells = <0>;
31+
status = "okay";
32+
33+
tas5756@4d {
34+
#sound-dai-cells = <0>;
35+
compatible = "ti,tas5756";
36+
reg = <0x4d>;
37+
clocks = <&dacpro_osc>;
38+
status = "okay";
39+
};
40+
};
41+
};
42+
43+
fragment@3 {
44+
target = <&sound>;
45+
hifiberry_dacplus: __overlay__ {
46+
compatible = "hifiberry,hifiberry-dacplus";
47+
i2s-controller = <&i2s_clk_consumer>;
48+
status = "okay";
49+
mute-gpio = <&gpio 4 GPIO_ACTIVE_LOW>;
50+
};
51+
};
52+
53+
__overrides__ {
54+
24db_digital_gain =
55+
<&hifiberry_dacplus>,"hifiberry-amp4,24db_digital_gain?";
56+
leds_off = <&hifiberry_dacplus>,"hifiberry-amp4,leds_off?";
57+
mute_ext_ctl = <&hifiberry_dacplus>,"hifiberry-amp4,mute_ext_ctl:0";
58+
auto_mute = <&hifiberry_dacplus>,"hifiberry-amp4,auto_mute?";
59+
slave = <&hifiberry_dacplus>,"hifiberry-dacplus,slave?",
60+
<&frag1>,"target:0=",<&i2s_clk_producer>,
61+
<&hifiberry_dacplus>,"i2s-controller:0=",<&i2s_clk_producer>;
62+
};
63+
};

0 commit comments

Comments
 (0)