Skip to content

Modify overlay and add driver for Chipdip DAC #4476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 27, 2021
Merged
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: 1 addition & 1 deletion arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
audremap.dtbo \
balena-fin.dtbo \
cap1106.dtbo \
chipdip-i2s-master-dac.dtbo \
chipdip-dac.dtbo \
cma.dtbo \
dht11.dtbo \
dionaudio-loco.dtbo \
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,9 @@ Load: dtoverlay=cap1106,<param>=<val>
Params: int_pin GPIO pin for interrupt signal (default 23)


Name: chipdip-i2s-master-dac
Info: Configures Raspberry PI to work as I2S slave with BCLK=64Fs.
Load: dtoverlay=chipdip-i2s-master-dac
Name: chipdip-dac
Info: Configures Chip Dip audio cards.
Load: dtoverlay=chipdip-dac
Params: <None>


Expand Down
46 changes: 46 additions & 0 deletions arch/arm/boot/dts/overlays/chipdip-dac-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Device Tree overlay for ChipDip DAC
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835";

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

fragment@1 {
target-path = "/";
__overlay__ {
spdif-transmitter {
#address-cells = <0>;
#size-cells = <0>;
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
status = "okay";
};
};
};

fragment@2 {
target = <&sound>;
__overlay__ {
compatible = "chipdip,chipdip-dac";
i2s-controller = <&i2s>;
sr0-gpios = <&gpio 5 0>;
sr1-gpios = <&gpio 6 0>;
sr2-gpios = <&gpio 12 0>;
res0-gpios = <&gpio 24 0>;
res1-gpios = <&gpio 27 0>;
mute-gpios = <&gpio 4 0>;
sdwn-gpios = <&gpio 13 0>;
status = "okay";
};
};
};
53 changes: 0 additions & 53 deletions arch/arm/boot/dts/overlays/chipdip-i2s-master-dac-overlay.dts

This file was deleted.

1 change: 1 addition & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@ CONFIG_SND_USB_6FIRE=m
CONFIG_SND_USB_HIFACE=m
CONFIG_SND_SOC=m
CONFIG_SND_BCM2835_SOC_I2S=m
CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m
CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ CONFIG_SND_USB_6FIRE=m
CONFIG_SND_USB_HIFACE=m
CONFIG_SND_SOC=m
CONFIG_SND_BCM2835_SOC_I2S=m
CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m
CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ CONFIG_SND_USB_6FIRE=m
CONFIG_SND_USB_HIFACE=m
CONFIG_SND_SOC=m
CONFIG_SND_BCM2835_SOC_I2S=m
CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m
CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ CONFIG_SND_USB_6FIRE=m
CONFIG_SND_USB_HIFACE=m
CONFIG_SND_SOC=m
CONFIG_SND_BCM2835_SOC_I2S=m
CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m
CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcmrpi3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_USB_6FIRE=m
CONFIG_SND_SOC=m
CONFIG_SND_BCM2835_SOC_I2S=m
CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m
Expand Down
6 changes: 6 additions & 0 deletions sound/soc/bcm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ config SND_BCM63XX_I2S_WHISTLER

If you don't know what to do here, say N

config SND_BCM2708_SOC_CHIPDIP_DAC
tristate "Support for the ChipDip DAC"
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
help
Say Y or M if you want to add support for the ChipDip DAC soundcard

config SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD
tristate "Support for Google voiceHAT soundcard"
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/bcm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ snd-soc-fe-pi-audio-objs := fe-pi-audio.o
snd-soc-rpi-simple-soundcard-objs := rpi-simple-soundcard.o
snd-soc-rpi-wm8804-soundcard-objs := rpi-wm8804-soundcard.o
snd-soc-pifi-40-objs := pifi-40.o
snd-soc-chipdip-dac-objs := chipdip-dac.o

obj-$(CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD) += snd-soc-googlevoicehat-codec.o
obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
Expand Down Expand Up @@ -78,4 +79,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO) += snd-soc-fe-pi-audio.o
obj-$(CONFIG_SND_RPI_SIMPLE_SOUNDCARD) += snd-soc-rpi-simple-soundcard.o
obj-$(CONFIG_SND_RPI_WM8804_SOUNDCARD) += snd-soc-rpi-wm8804-soundcard.o
obj-$(CONFIG_SND_BCM2708_SOC_PIFI_40) += snd-soc-pifi-40.o

obj-$(CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC) += snd-soc-chipdip-dac.o
Loading