Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
hifiberry-dacplushd.dtbo \
hifiberry-digi.dtbo \
hifiberry-digi-pro.dtbo \
hifiberry-studio-dac8x.dtbo \
hifiberry-studio-dac8x-pro.dtbo \
highperi.dtbo \
hy28a.dtbo \
hy28b.dtbo \
Expand Down
12 changes: 12 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -2062,6 +2062,18 @@ Load: dtoverlay=hifiberry-digi-pro
Params: <None>


Name: hifiberry-studio-dac8x
Info: Configures the HifiBerry Studio DAC8x audio card
Load: dtoverlay=hifiberry-studio-dac8x
Params: <None>


Name: hifiberry-studio-dac8x-pro
Info: Configures the HifiBerry Studio DAC8x PRO audio card
Load: dtoverlay=hifiberry-studio-dac8x-pro
Params: <None>


Name: highperi
Info: Enables "High Peripheral" mode
Load: dtoverlay=highperi
Expand Down
59 changes: 59 additions & 0 deletions arch/arm/boot/dts/overlays/hifiberry-studio-dac8x-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// SPDX-License-Identifier: GPL-2.0
// Definitions for HiFiBerry Studio DAC8x soundcard
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2712";

fragment@0 {
target = <&i2c1>;
__overlay__ {
status = "okay";
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
rp1_i2s0_dac8x: rp1_i2s0_dac8x {
function = "i2s0";
pins = "gpio18", "gpio19", "gpio20",
"gpio21", "gpio22", "gpio23",
"gpio24", "gpio25", "gpio26",
"gpio27";
bias-disable;
};
};
};

fragment@2 {
target = <&i2s_clk_producer>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&rp1_i2s0_dac8x>;
status = "okay";
};
};

fragment@3 {
target-path = "/";
__overlay__ {
dummy-codec {
#sound-dai-cells = <0>;
compatible = "snd-soc-dummy";
status = "okay";
};
};
};

fragment@4 {
target = <&sound>;
__overlay__ {
compatible = "hifiberry,hifiberry-studio-dac8x";
i2s-controller = <&i2s_clk_producer>;
status = "okay";
};
};

};
60 changes: 60 additions & 0 deletions arch/arm/boot/dts/overlays/hifiberry-studio-dac8x-pro-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// SPDX-License-Identifier: GPL-2.0
// Definitions for HiFiBerry Studio DAC8x PRO soundcard
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2712";

fragment@0 {
target = <&i2c1>;
__overlay__ {
status = "okay";
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
rp1_i2s1_dac8x: rp1_i2s1_dac8x {
function = "i2s1";
pins = "gpio18", "gpio19", "gpio20",
"gpio21", "gpio22", "gpio23",
"gpio24", "gpio25", "gpio26",
"gpio27";
bias-disable;
};
};
};

fragment@2 {
target = <&i2s_clk_consumer>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&rp1_i2s1_dac8x>;
status = "okay";
};
};

fragment@3 {
target-path = "/";
__overlay__ {
dummy-codec {
#sound-dai-cells = <0>;
compatible = "snd-soc-dummy";
status = "okay";
};
};
};

fragment@4 {
target = <&sound>;
__overlay__ {
compatible = "hifiberry,hifiberry-studio-dac8x";
i2s-controller = <&i2s_clk_consumer>;
clk-provider;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would not be necessary if the Pro had a different compatible string, but you may have reasons to prefer doing it like this - I'm not really bothered either way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep it as is. It seems the easiest and simple way for us.

status = "okay";
};
};

};
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_STUDIO_DAC8X=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m
CONFIG_SND_BCM2708_SOC_PIFI_40=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_STUDIO_DAC8X=m
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should also add this to bcm2711_defconfig, which runs happily on Pi 5, just with 4kB pages instead of 16kB.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that bcm2711 kernel runs on a Pi 5 but our driver does not support Pi 4 as it's made for multi channel audio (only).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not a problem. All the kernels have support for lots of hardware that most people don't have, which is fine if the drivers are modules.

CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m
CONFIG_SND_BCM2708_SOC_PIFI_40=m
Expand Down
7 changes: 7 additions & 0 deletions sound/soc/bcm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
help
Say Y or M if you want to add support for HifiBerry DSP-DAC.

config SND_BCM2708_SOC_HIFIBERRY_STUDIO_DAC8X

Check failure on line 103 in sound/soc/bcm/Kconfig

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please write a help paragraph that fully describes the config symbol
tristate "Support for HifiBerry Studio DAC8x soundcards"
help
Say Y or M if you want to add support for
HifiBerry Studio DAC8x soundcards. Only available
for Pi 5

config SND_BCM2708_SOC_HIFIBERRY_DIGI
tristate "Support for HifiBerry Digi"
select SND_SOC_WM8804
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/bcm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ snd-soc-hifiberry-dacplushd-objs := hifiberry_dacplushd.o
snd-soc-hifiberry-dacplusadc-objs := hifiberry_dacplusadc.o
snd-soc-hifiberry-dacplusadcpro-objs := hifiberry_dacplusadcpro.o
snd-soc-hifiberry-dacplusdsp-objs := hifiberry_dacplusdsp.o
snd-soc-hifiberry-studio-dac8x-objs := hifiberry_studio_dac8x.o
snd-soc-justboom-both-objs := justboom-both.o
snd-soc-justboom-dac-objs := justboom-dac.o
snd-soc-rpi-cirrus-objs := rpi-cirrus.o
Expand Down Expand Up @@ -58,6 +59,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD) += snd-soc-hifiberry-dacplushd
obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC) += snd-soc-hifiberry-dacplusadc.o
obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO) += snd-soc-hifiberry-dacplusadcpro.o
obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP) += snd-soc-hifiberry-dacplusdsp.o
obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_STUDIO_DAC8X) += snd-soc-hifiberry-studio-dac8x.o
obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH) += snd-soc-justboom-both.o
obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o
obj-$(CONFIG_SND_BCM2708_SOC_RPI_CIRRUS) += snd-soc-rpi-cirrus.o
Expand Down
Loading