Skip to content

Commit aa46aa9

Browse files
gtrainaviciuspopcornmix
authored andcommitted
Support for Blokas Labs pisound board
Pisound dynamic overlay (#1760) Restructuring pisound-overlay.dts, so it can be loaded and unloaded dynamically using dtoverlay. Print a logline when the kernel module is removed.
1 parent 203501a commit aa46aa9

File tree

5 files changed

+1048
-44
lines changed

5 files changed

+1048
-44
lines changed

Documentation/devicetree/bindings/vendor-prefixes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ auvidea Auvidea GmbH
4040
avago Avago Technologies
4141
avic Shanghai AVIC Optoelectronics Co., Ltd.
4242
axis Axis Communications AB
43+
blokaslabs Vilniaus Blokas UAB
4344
boe BOE Technology Group Co., Ltd.
4445
bosch Bosch Sensortec GmbH
4546
boundary Boundary Devices Inc.

arch/arm/boot/dts/overlays/pisound-overlay.dts

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,54 @@
2626
compatible = "brcm,bcm2708";
2727

2828
fragment@0 {
29+
target = <&spi0>;
30+
__overlay__ {
31+
status = "okay";
32+
};
33+
};
34+
35+
fragment@1 {
36+
target = <&spidev0>;
37+
__overlay__ {
38+
status = "disabled";
39+
};
40+
};
41+
42+
fragment@2 {
43+
target = <&spidev1>;
44+
__overlay__ {
45+
status = "okay";
46+
};
47+
};
48+
49+
fragment@3 {
50+
target = <&spi0>;
51+
__overlay__ {
52+
#address-cells = <1>;
53+
#size-cells = <0>;
54+
55+
pisound_spi: pisound_spi@0{
56+
compatible = "blokaslabs,pisound-spi";
57+
reg = <0>;
58+
pinctrl-names = "default";
59+
pinctrl-0 = <&spi0_pins>;
60+
spi-max-frequency = <1000000>;
61+
};
62+
};
63+
};
64+
65+
fragment@4 {
66+
target-path = "/";
67+
__overlay__ {
68+
pcm5102a-codec {
69+
#sound-dai-cells = <0>;
70+
compatible = "ti,pcm5102a";
71+
status = "okay";
72+
};
73+
};
74+
};
75+
76+
fragment@5 {
2977
target = <&sound>;
3078
__overlay__ {
3179
compatible = "blokaslabs,pisound";
@@ -49,7 +97,7 @@
4997
};
5098
};
5199

52-
fragment@1 {
100+
fragment@6 {
53101
target = <&gpio>;
54102
__overlay__ {
55103
pinctrl-names = "default";
@@ -63,52 +111,10 @@
63111
};
64112
};
65113

66-
fragment@2 {
114+
fragment@7 {
67115
target = <&i2s>;
68116
__overlay__ {
69117
status = "okay";
70118
};
71119
};
72-
73-
fragment@3 {
74-
target-path = "/";
75-
__overlay__ {
76-
pcm5102a-codec {
77-
#sound-dai-cells = <0>;
78-
compatible = "ti,pcm5102a";
79-
status = "okay";
80-
};
81-
};
82-
};
83-
84-
fragment@4 {
85-
target = <&spi0>;
86-
__overlay__ {
87-
status = "okay";
88-
89-
spidev@0{
90-
status = "disabled";
91-
};
92-
93-
spidev@1{
94-
status = "okay";
95-
};
96-
};
97-
};
98-
99-
fragment@5 {
100-
target = <&spi0>;
101-
__overlay__ {
102-
#address-cells = <1>;
103-
#size-cells = <0>;
104-
105-
pisound_spi: pisound_spi@0{
106-
compatible = "blokaslabs,pisound-spi";
107-
reg = <0>;
108-
pinctrl-names = "default";
109-
pinctrl-0 = <&spi0_pins>;
110-
spi-max-frequency = <1000000>;
111-
};
112-
};
113-
};
114120
};

sound/soc/bcm/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,9 @@ config SND_BCM2708_SOC_ALLO_PIANO_DAC
123123
select SND_SOC_PCM512x_I2C
124124
help
125125
Say Y or M if you want to add support for Allo Piano DAC.
126+
127+
config SND_PISOUND
128+
tristate "Support for Blokas Labs pisound"
129+
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
130+
help
131+
Say Y or M if you want to add support for Blokas Labs pisound.

sound/soc/bcm/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
2424
snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o
2525
snd-soc-dionaudio-loco-objs := dionaudio_loco.o
2626
snd-soc-allo-piano-dac-objs := allo-piano-dac.o
27+
snd-soc-pisound-objs := pisound.o
2728

2829
obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
2930
obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
@@ -40,3 +41,4 @@ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundca
4041
obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o
4142
obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o
4243
obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o
44+
obj-$(CONFIG_SND_PISOUND) += snd-soc-pisound.o

0 commit comments

Comments
 (0)