Skip to content

Commit

Permalink
Support for Blokas Labs pisound board
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gtrainavicius authored and popcornmix committed Feb 20, 2017
1 parent 7062541 commit 03b737c
Show file tree
Hide file tree
Showing 5 changed files with 1,048 additions and 44 deletions.
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ auvidea Auvidea GmbH
avago Avago Technologies
avic Shanghai AVIC Optoelectronics Co., Ltd.
axis Axis Communications AB
blokaslabs Vilniaus Blokas UAB
boe BOE Technology Group Co., Ltd.
bosch Bosch Sensortec GmbH
boundary Boundary Devices Inc.
Expand Down
94 changes: 50 additions & 44 deletions arch/arm/boot/dts/overlays/pisound-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,54 @@
compatible = "brcm,bcm2708";

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

fragment@1 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};

fragment@2 {
target = <&spidev1>;
__overlay__ {
status = "okay";
};
};

fragment@3 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;

pisound_spi: pisound_spi@0{
compatible = "blokaslabs,pisound-spi";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
spi-max-frequency = <1000000>;
};
};
};

fragment@4 {
target-path = "/";
__overlay__ {
pcm5102a-codec {
#sound-dai-cells = <0>;
compatible = "ti,pcm5102a";
status = "okay";
};
};
};

fragment@5 {
target = <&sound>;
__overlay__ {
compatible = "blokaslabs,pisound";
Expand All @@ -49,7 +97,7 @@
};
};

fragment@1 {
fragment@6 {
target = <&gpio>;
__overlay__ {
pinctrl-names = "default";
Expand All @@ -63,52 +111,10 @@
};
};

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

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

fragment@4 {
target = <&spi0>;
__overlay__ {
status = "okay";

spidev@0{
status = "disabled";
};

spidev@1{
status = "okay";
};
};
};

fragment@5 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;

pisound_spi: pisound_spi@0{
compatible = "blokaslabs,pisound-spi";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
spi-max-frequency = <1000000>;
};
};
};
};
6 changes: 6 additions & 0 deletions sound/soc/bcm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,9 @@ config SND_BCM2708_SOC_ALLO_PIANO_DAC
select SND_SOC_PCM512x_I2C
help
Say Y or M if you want to add support for Allo Piano DAC.

config SND_PISOUND
tristate "Support for Blokas Labs pisound"
depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
help
Say Y or M if you want to add support for Blokas Labs pisound.
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-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o
snd-soc-dionaudio-loco-objs := dionaudio_loco.o
snd-soc-allo-piano-dac-objs := allo-piano-dac.o
snd-soc-pisound-objs := pisound.o

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

0 comments on commit 03b737c

Please sign in to comment.