Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm899…
Browse files Browse the repository at this point in the history
…6' and 'asoc/topic/zx' into asoc-next
  • Loading branch information
Mark Brown committed Jun 5, 2015
4 parents 28bedc5 + d78395c + ed043ae + 67f7277 commit 11e6888
Show file tree
Hide file tree
Showing 10 changed files with 902 additions and 4 deletions.
44 changes: 44 additions & 0 deletions Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
ZTE ZX296702 I2S controller

Required properties:
- compatible : Must be "zte,zx296702-i2s"
- reg : Must contain I2S core's registers location and length
- clocks : Pairs of phandle and specifier referencing the controller's clocks.
- clock-names: "tx" for the clock to the I2S interface.
- dmas: Pairs of phandle and specifier for the DMA channel that is used by
the core. The core expects two dma channels for transmit.
- dma-names : Must be "tx" and "rx"

For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
please check:
* resource-names.txt
* clock/clock-bindings.txt
* dma/dma.txt

Example:
i2s0: i2s0@0b005000 {
#sound-dai-cells = <0>;
compatible = "zte,zx296702-i2s";
reg = <0x0b005000 0x1000>;
clocks = <&lsp0clk ZX296702_I2S0_DIV>;
clock-names = "tx";
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&dma 5>, <&dma 6>;
dma-names = "tx", "rx";
status = "okay";
};

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "zx296702_snd";
simple-audio-card,format = "left_j";
simple-audio-card,bitclock-master = <&sndcodec>;
simple-audio-card,frame-master = <&sndcodec>;
sndcpu: simple-audio-card,cpu {
sound-dai = <&i2s0>;
};

sndcodec: simple-audio-card,codec {
sound-dai = <&acodec>;
};
};
28 changes: 28 additions & 0 deletions Documentation/devicetree/bindings/sound/zte,zx-spdif.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ZTE ZX296702 SPDIF controller

Required properties:
- compatible : Must be "zte,zx296702-spdif"
- reg : Must contain SPDIF core's registers location and length
- clocks : Pairs of phandle and specifier referencing the controller's clocks.
- clock-names: "tx" for the clock to the SPDIF interface.
- dmas: Pairs of phandle and specifier for the DMA channel that is used by
the core. The core expects one dma channel for transmit.
- dma-names : Must be "tx"

For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
please check:
* resource-names.txt
* clock/clock-bindings.txt
* dma/dma.txt

Example:
spdif0: spdif0@0b004000 {
compatible = "zte,zx296702-spdif";
reg = <0x0b004000 0x1000>;
clocks = <&lsp0clk ZX296702_SPDIF0_DIV>;
clock-names = "tx";
interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&dma 4>;
dma-names = "tx";
status = "okay";
};
1 change: 1 addition & 0 deletions sound/soc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ source "sound/soc/tegra/Kconfig"
source "sound/soc/txx9/Kconfig"
source "sound/soc/ux500/Kconfig"
source "sound/soc/xtensa/Kconfig"
source "sound/soc/zte/Kconfig"

# Supported codecs
source "sound/soc/codecs/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions sound/soc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ obj-$(CONFIG_SND_SOC) += tegra/
obj-$(CONFIG_SND_SOC) += txx9/
obj-$(CONFIG_SND_SOC) += ux500/
obj-$(CONFIG_SND_SOC) += xtensa/
obj-$(CONFIG_SND_SOC) += zte/
6 changes: 4 additions & 2 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -4084,7 +4084,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
if (wm8994->micdet_irq)
ret = request_threaded_irq(wm8994->micdet_irq, NULL,
wm8994_mic_irq,
IRQF_TRIGGER_RISING,
IRQF_TRIGGER_RISING |
IRQF_ONESHOT,
"Mic1 detect",
wm8994);
else
Expand Down Expand Up @@ -4132,7 +4133,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
if (wm8994->micdet_irq) {
ret = request_threaded_irq(wm8994->micdet_irq, NULL,
wm8958_mic_irq,
IRQF_TRIGGER_RISING,
IRQF_TRIGGER_RISING |
IRQF_ONESHOT,
"Mic detect",
wm8994);
if (ret != 0)
Expand Down
6 changes: 4 additions & 2 deletions sound/soc/codecs/wm8996.c
Original file line number Diff line number Diff line change
Expand Up @@ -2647,10 +2647,12 @@ static int wm8996_probe(struct snd_soc_codec *codec)
if (irq_flags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))
ret = request_threaded_irq(i2c->irq, NULL,
wm8996_edge_irq,
irq_flags, "wm8996", codec);
irq_flags | IRQF_ONESHOT,
"wm8996", codec);
else
ret = request_threaded_irq(i2c->irq, NULL, wm8996_irq,
irq_flags, "wm8996", codec);
irq_flags | IRQF_ONESHOT,
"wm8996", codec);

if (ret == 0) {
/* Unmask the interrupt */
Expand Down
17 changes: 17 additions & 0 deletions sound/soc/zte/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
config ZX296702_SPDIF
tristate "ZX296702 spdif"
depends on SOC_ZX296702 || COMPILE_TEST
depends on COMMON_CLK
select SND_SOC_GENERIC_DMAENGINE_PCM
help
Say Y or M if you want to add support for codecs attached to the
zx296702 spdif interface

config ZX296702_I2S
tristate "ZX296702 i2s"
depends on SOC_ZX296702 || COMPILE_TEST
depends on COMMON_CLK
select SND_SOC_GENERIC_DMAENGINE_PCM
help
Say Y or M if you want to add support for codecs attached to the
zx296702 i2s interface
2 changes: 2 additions & 0 deletions sound/soc/zte/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
obj-$(CONFIG_ZX296702_SPDIF) += zx296702-spdif.o
obj-$(CONFIG_ZX296702_I2S) += zx296702-i2s.o
Loading

0 comments on commit 11e6888

Please sign in to comment.