ASoC: add CSR SiRFSoC sound drivers
Subsystems (3)
v5 cover ASoC: add CSR SiRFSoC sound drivers
From: Rongjun Ying <[email protected]>
This patchset adds CSR SiRFSoC sound drivers including:
1. The SiRF internal audio codec driver
2. The SiRF audio port driver
3. The SiRF internal audio card driver
4. The SiRF I2S controller driver
5. The SiRF hdmi card driver
6. The SiRF USP controller(DSP mode) driver
7. The SiRF bt-sco card driver
-v5:
1. Drop all inlines.
2. Reordering the Kconfig and Makefile
3. Remove the sirf_audio_codec_reg_bits struct, use the new controls instead it.
4. Add some SND_SOC_DAPM_OUT_DRV instead of HP and SPK enable driver
5. Add audio codec clock supply instead of adc event callback
6. Fixed playback and capture can't concurrent work bug.
Rongjun Ying (7):
ASoC: sirf: Add SiRF internal audio codec driver
ASoC: sirf: Add SiRF audio port driver is used by SiRF internal audio
codec
ASoC: sirf: Add SiRF audio card
ASoC: sirf: Add SiRF I2S driver
ASoC: sirf: Add hdmi card
ASoC: sirf: Add usp driver which is used by dsp mode
ASoC: sirf: Add bt-sco card
.../devicetree/bindings/sound/sirf-audio-codec.txt | 17 + .../devicetree/bindings/sound/sirf-audio-port.txt | 20 + .../devicetree/bindings/sound/sirf-audio.txt | 41 ++ .../devicetree/bindings/sound/sirf-bt-sco.txt | 18 + .../devicetree/bindings/sound/sirf-hdmi.txt | 15 + .../devicetree/bindings/sound/sirf-i2s.txt | 27 + .../devicetree/bindings/sound/sirf-usp.txt | 27 + sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/codecs/Kconfig | 6 +- sound/soc/codecs/Makefile | 2 + sound/soc/codecs/sirf-audio-codec.c | 534 ++++++++++++++++++++ sound/soc/codecs/sirf-audio-codec.h | 75 +++ sound/soc/sirf/Kconfig | 34 ++ sound/soc/sirf/Makefile | 13 + sound/soc/sirf/sirf-audio-port.c | 194 +++++++ sound/soc/sirf/sirf-audio-port.h | 62 +++ sound/soc/sirf/sirf-audio.c | 156 ++++++ sound/soc/sirf/sirf-bt-sco.c | 99 ++++ sound/soc/sirf/sirf-hdmi.c | 98 ++++ sound/soc/sirf/sirf-i2s.c | 434 ++++++++++++++++ sound/soc/sirf/sirf-i2s.h | 88 ++++ sound/soc/sirf/sirf-usp.c | 448 ++++++++++++++++ sound/soc/sirf/sirf-usp.h | 282 +++++++++++ 24 files changed, 2691 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-codec.txt create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-port.txt create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio.txt create mode 100644 Documentation/devicetree/bindings/sound/sirf-bt-sco.txt create mode 100644 Documentation/devicetree/bindings/sound/sirf-hdmi.txt create mode 100644 Documentation/devicetree/bindings/sound/sirf-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/sirf-usp.txt create mode 100644 sound/soc/codecs/sirf-audio-codec.c create mode 100644 sound/soc/codecs/sirf-audio-codec.h create mode 100644 sound/soc/sirf/Kconfig create mode 100644 sound/soc/sirf/Makefile create mode 100644 sound/soc/sirf/sirf-audio-port.c create mode 100644 sound/soc/sirf/sirf-audio-port.h create mode 100644 sound/soc/sirf/sirf-audio.c create mode 100644 sound/soc/sirf/sirf-bt-sco.c create mode 100644 sound/soc/sirf/sirf-hdmi.c create mode 100644 sound/soc/sirf/sirf-i2s.c create mode 100644 sound/soc/sirf/sirf-i2s.h create mode 100644 sound/soc/sirf/sirf-usp.c create mode 100644 sound/soc/sirf/sirf-usp.h
Signature · 1 line
1.7.5.4
PATCH v5 1/7 ASoC: sirf: Add SiRF internal audio codec driver
From: Rongjun Ying <[email protected]>
SiRF internal audio codec is integrated in SiRF atlas6 and prima2 SoC. Features include:
1. Stereo DAC and ADC with 16-bit resolution amd 48KHz sample rate
2. Support headphone and/or speaker output
3. Integrate headphone and speaker output amp
4. Support LINE and MIC input
5. Support single ended and differential input mode
---
-v5:
1. Drop all inlines.
2. Reordering the Kconfig and Makefile
3. Remove the sirf_audio_codec_reg_bits struct, use the new controls instead it.
4. Add some SND_SOC_DAPM_OUT_DRV instead of HP and SPK enable driver
5. Add audio codec clock supply instead of adc event callback
6. Fixed playback and capture can't concurrent work bug.
.../devicetree/bindings/sound/sirf-audio-codec.txt | 17 + sound/soc/codecs/Kconfig | 6 +- sound/soc/codecs/Makefile | 2 + sound/soc/codecs/sirf-audio-codec.c | 534 ++++++++++++++++++++ sound/soc/codecs/sirf-audio-codec.h | 75 +++ 5 files changed, 633 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-codec.txt create mode 100644 sound/soc/codecs/sirf-audio-codec.c create mode 100644 sound/soc/codecs/sirf-audio-codec.h
Documentation/devicetree/bindings/sound/sirf-audio-codec.txt new file +17 -0
@@ -0,0 +1,17 @@ +SiRF internal audio CODEC + +Required properties: + + - compatible : "sirf,atlas6-audio-codec" or "sirf,prima2-audio-codec" + + - reg : the register address of the device. + + - clocks: the clock of SiRF internal audio codec + +Example: + +audiocodec: audiocodec@b0040000 { + compatible = "sirf,atlas6-audio-codec"; + reg = <0xb0040000 0x10000>; + clocks = <&clks 27>; +};
sound/soc/codecs/Kconfig +5 -1
@@ -71,6 +71,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_RT5640 if I2C select SND_SOC_SGTL5000 if I2C select SND_SOC_SI476X if MFD_SI476X_CORE + select SND_SOC_SIRF_AUDIO_CODEC select SND_SOC_SN95031 if INTEL_SCU_IPC select SND_SOC_SPDIF select SND_SOC_SSM2518 if I2C
@@ -383,6 +384,10 @@ config SND_SOC_SIGMADSP tristate select CRC32 +config SND_SOC_SIRF_AUDIO_CODEC + tristate "SiRF SoC internal audio codec" + select REGMAP_MMIO + config SND_SOC_SN95031 tristate
@@ -633,5 +638,4 @@ config SND_SOC_ML26124 config SND_SOC_TPA6130A2 tristate "Texas Instruments TPA6130A2 headphone amplifier" depends on I2C - endmenu
sound/soc/codecs/Makefile +2 -0
@@ -134,6 +134,7 @@ snd-soc-wm9705-objs := wm9705.o snd-soc-wm9712-objs := wm9712.o snd-soc-wm9713-objs := wm9713.o snd-soc-wm-hubs-objs := wm_hubs.o +snd-soc-sirf-audio-codec-objs := sirf-audio-codec.o # Amp snd-soc-max9877-objs := max9877.o
@@ -274,6 +275,7 @@ obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o obj-$(CONFIG_SND_SOC_WM_ADSP) += snd-soc-wm-adsp.o obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o +obj-$(CONFIG_SND_SOC_SIRF_AUDIO_CODEC) += snd-soc-sirf-audio-codec.o # Amp obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o
sound/soc/codecs/sirf-audio-codec.c new file +532 -0
532 lines not on this page · raw message
sound/soc/codecs/sirf-audio-codec.h new file +75 -0
75 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Mark Brown
maintainerRe: [PATCH v5 1/7] ASoC: sirf: Add SiRF internal audio codec driver
Quoted 4 lines · RongJun Ying
From: Rongjun Ying <[email protected]>
SiRF internal audio codec is integrated in SiRF atlas6 and prima2 SoC. Features include:
Please check your mailer configuration and resend, git is complaining that this patch is corrupted when I try to apply it (it references line 630 when doing so).
PATCH v5 2/7 ASoC: sirf: Add SiRF audio port driver is used by SiRF internal audio codec
In reply to RongJun YingFrom: Rongjun Ying <[email protected]>
This driver is used by SIRF internal audio codec.
Use dedicated SiRF audio port TXFIFO and RXFIFO Supports two DMA channels for SiRF audio port TXFIFO and RXFIFO The audio port like as audio bus such as i2s.
--- .../devicetree/bindings/sound/sirf-audio-port.txt | 20 ++ sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/sirf/Kconfig | 9 + sound/soc/sirf/Makefile | 3 + sound/soc/sirf/sirf-audio-port.c | 194 ++++++++++++++++++++ sound/soc/sirf/sirf-audio-port.h | 62 +++++++ 7 files changed, 290 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-port.txt create mode 100644 sound/soc/sirf/Kconfig create mode 100644 sound/soc/sirf/Makefile create mode 100644 sound/soc/sirf/sirf-audio-port.c create mode 100644 sound/soc/sirf/sirf-audio-port.h
Documentation/devicetree/bindings/sound/sirf-audio-port.txt new file +20 -0
@@ -0,0 +1,20 @@ +* SiRF SoC audio port + +Required properties: +- compatible: "sirf,audio-port" +- reg: Base address and size entries: +- dmas: List of DMA controller phandle and DMA request line ordered pairs. +- dma-names: Identifier string for each DMA request line in the dmas property. + These strings correspond 1:1 with the ordered pairs in dmas. + + One of the DMA channels will be responsible for transmission (should be + named "tx") and one for reception (should be named "rx"). + +Example: + +audioport: audioport@b0040000 { + compatible = "sirf,audio-port"; + reg = <0xb0040000 0x10000>; + dmas = <&dmac1 3>, <&dmac1 8>; + dma-names = "rx", "tx"; +};
sound/soc/Kconfig +1 -0
@@ -50,6 +50,7 @@ source "sound/soc/pxa/Kconfig" source "sound/soc/samsung/Kconfig" source "sound/soc/s6000/Kconfig" source "sound/soc/sh/Kconfig" +source "sound/soc/sirf/Kconfig" source "sound/soc/spear/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig"
sound/soc/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_SND_SOC) += pxa/ obj-$(CONFIG_SND_SOC) += samsung/ obj-$(CONFIG_SND_SOC) += s6000/ obj-$(CONFIG_SND_SOC) += sh/ +obj-$(CONFIG_SND_SOC) += sirf/ obj-$(CONFIG_SND_SOC) += spear/ obj-$(CONFIG_SND_SOC) += tegra/ obj-$(CONFIG_SND_SOC) += txx9/
sound/soc/sirf/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config SND_SOC_SIRF + tristate "SoC Audio for the SiRF SoC chips" + depends on ARCH_SIRF || COMPILE_TEST + select SND_SOC_GENERIC_DMAENGINE_PCM + +config SND_SOC_SIRF_AUDIO_PORT + select REGMAP_MMIO + tristate +
sound/soc/sirf/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +snd-soc-sirf-audio-port-objs := sirf-audio-port.o + +obj-$(CONFIG_SND_SOC_SIRF_AUDIO_PORT) += snd-soc-sirf-audio-port.o
sound/soc/sirf/sirf-audio-port.c new file +194 -0
194 lines not on this page · raw message
sound/soc/sirf/sirf-audio-port.h new file +62 -0
62 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v5 3/7 ASoC: sirf: Add SiRF audio card
In reply to RongJun YingFrom: Rongjun Ying <[email protected]>
This connects platform DAI, SiRF internal audio codec DAI and SiRF auido port DAI together and works as a mach driver.
--- .../devicetree/bindings/sound/sirf-audio.txt | 41 +++++ sound/soc/sirf/Kconfig | 7 +- sound/soc/sirf/Makefile | 2 + sound/soc/sirf/sirf-audio.c | 156 ++++++++++++++++++++ 4 files changed, 205 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio.txt create mode 100644 sound/soc/sirf/sirf-audio.c
Documentation/devicetree/bindings/sound/sirf-audio.txt new file +41 -0
@@ -0,0 +1,41 @@ +* SiRF atlas6 and prima2 internal audio codec and port based audio setups + +Required properties: +- compatible: "sirf,sirf-audio-card" +- sirf,audio-platform: phandle for the platform node +- sirf,audio-codec: phandle for the SiRF internal codec node + +Optional properties: +- hp-pa-gpios: Need to be present if the board need control external + headphone amplifier. +- spk-pa-gpios: Need to be present if the board need control external + speaker amplifier. +- hp-switch-gpios: Need to be present if the board capable to detect jack + insertion, removal. + +Available audio endpoints for the audio-routing table: + +Board connectors: + * Headset Stereophone + * Ext Spk + * Line In + * Mic + +SiRF internal audio codec pins: + * HPOUTL + * HPOUTR + * SPKOUT + * Ext Mic + * Mic Bias + +Example: + +sound { + compatible = "sirf,sirf-audio-card"; + sirf,audio-codec = <&audiocodec>; + sirf,audio-platform = <&audioport>; + hp-pa-gpios = <&gpio 44 0>; + spk-pa-gpios = <&gpio 46 0>; + hp-switch-gpios = <&gpio 45 0>; +}; +
sound/soc/sirf/Kconfig +6 -1
@@ -3,7 +3,12 @@ config SND_SOC_SIRF depends on ARCH_SIRF || COMPILE_TEST select SND_SOC_GENERIC_DMAENGINE_PCM +config SND_SOC_SIRF_AUDIO + tristate "SoC Audio support for SiRF internal audio codec" + depends on SND_SOC_SIRF + select SND_SOC_SIRF_AUDIO_CODEC + select SND_SOC_SIRF_AUDIO_PORT + config SND_SOC_SIRF_AUDIO_PORT select REGMAP_MMIO tristate -
sound/soc/sirf/Makefile +2 -0
@@ -1,3 +1,5 @@ +snd-soc-sirf-audio-objs := sirf-audio.o snd-soc-sirf-audio-port-objs := sirf-audio-port.o +obj-$(CONFIG_SND_SOC_SIRF_AUDIO) += snd-soc-sirf-audio.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO_PORT) += snd-soc-sirf-audio-port.o
sound/soc/sirf/sirf-audio.c new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v5 4/7 ASoC: sirf: Add SiRF I2S driver
In reply to RongJun YingFrom: Rongjun Ying <[email protected]>
This patch adds ASoC support for SiRF SoCs I2S modules.
Features include:
1. I2S bus specification compliant (Released by Philips Semiconductors in June, 1996)
2. Support both master and slave mode.
3. Provides MCLK to I2S CODEC in I2S master mode
4. Supports 16-bit resolution playback
5. Supports 16-bit resolution record
6 .Supports 2 channel record
7. Supports 2 channel and 6 channel mode playback
8. Frame length, left channel length and right channel length are all programmable
9. Supports two DMA channels for TXFIFO and RXFIFO
10. Supports floating mode (x_ac97_dout can be configured as input)
---
-v5:
1. Drop all inlines.
2. Fixed returning ret twice is redundant in sirf_i2s_runtime_resume function
.../devicetree/bindings/sound/sirf-i2s.txt | 27 ++ sound/soc/sirf/Kconfig | 4 + sound/soc/sirf/Makefile | 2 + sound/soc/sirf/sirf-i2s.c | 434 ++++++++++++++++++++ sound/soc/sirf/sirf-i2s.h | 88 ++++ 5 files changed, 555 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-i2s.txt create mode 100644 sound/soc/sirf/sirf-i2s.c create mode 100644 sound/soc/sirf/sirf-i2s.h
Documentation/devicetree/bindings/sound/sirf-i2s.txt new file +27 -0
@@ -0,0 +1,27 @@ +* SiRF SoC I2S module + +Required properties: +- compatible: "sirf,prima2-i2s" +- reg: Base address and size entries: +- dmas: List of DMA controller phandle and DMA request line ordered pairs. +- dma-names: Identifier string for each DMA request line in the dmas property. + These strings correspond 1:1 with the ordered pairs in dmas. + + One of the DMA channels will be responsible for transmission (should be + named "tx") and one for reception (should be named "rx"). + +- clocks: I2S controller clock source +- pinctrl-names: Must contain a "default" entry. +- pinctrl-NNN: One property must exist for each entry in pinctrl-names. + +Example: + +i2s: i2s@b0040000 { + compatible = "sirf,prima2-i2s"; + reg = <0xb0040000 0x10000>; + dmas = <&dmac1 6>, <&dmac1 12>; + dma-names = "rx", "tx"; + clocks = <&clks 27>; + pinctrl-names = "default"; + pinctrl-0 = <&i2s_pins_a>; +};
sound/soc/sirf/Kconfig +4 -0
@@ -12,3 +12,7 @@ config SND_SOC_SIRF_AUDIO config SND_SOC_SIRF_AUDIO_PORT select REGMAP_MMIO tristate + +config SND_SOC_SIRF_I2S + select REGMAP_MMIO + tristate
sound/soc/sirf/Makefile +2 -0
@@ -1,5 +1,7 @@ snd-soc-sirf-audio-objs := sirf-audio.o snd-soc-sirf-audio-port-objs := sirf-audio-port.o +snd-soc-sirf-i2s-objs := sirf-i2s.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO) += snd-soc-sirf-audio.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO_PORT) += snd-soc-sirf-audio-port.o +obj-$(CONFIG_SND_SOC_SIRF_I2S) += snd-soc-sirf-i2s.o
sound/soc/sirf/sirf-i2s.c new file +434 -0
434 lines not on this page · raw message
sound/soc/sirf/sirf-i2s.h new file +88 -0
88 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v5 5/7 ASoC: sirf: Add hdmi card
In reply to RongJun YingFrom: Rongjun Ying <[email protected]>
This connects platform DAI, hdmi audio codec DAI and SiRF I2S DAI together and works as a mach driver.
--- .../devicetree/bindings/sound/sirf-hdmi.txt | 15 +++ sound/soc/sirf/Kconfig | 6 + sound/soc/sirf/Makefile | 2 + sound/soc/sirf/sirf-hdmi.c | 98 ++++++++++++++++++++ 4 files changed, 121 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-hdmi.txt create mode 100644 sound/soc/sirf/sirf-hdmi.c
Documentation/devicetree/bindings/sound/sirf-hdmi.txt new file +15 -0
@@ -0,0 +1,15 @@ +* SiRF atlas6/prima2 hdmi audio codec based audio setups + +Required properties: +- compatible: "sirf,sirf-hdmi" +- sirf,i2s-controller: The phandle of the SiRF I2S controller. +- sirf,hdmi-audio-codec: The phandle of the hdmi audio codec. + +Example: + +sirf-hdmi { + compatible = "sirf,hdmi-card"; + sirf,i2s-controller = <&i2s>; + sirf,hdmi-audio-codec = <&hdmi_audio>; +}; +
sound/soc/sirf/Kconfig +6 -0
@@ -13,6 +13,12 @@ config SND_SOC_SIRF_AUDIO_PORT select REGMAP_MMIO tristate +config SND_SOC_SIRF_HDMI + tristate "SoC Audio support for SiRF HDMI" + depends on SND_SOC_SIRF + select SND_SOC_SIRF_I2S + select SND_SOC_HDMI_CODEC + config SND_SOC_SIRF_I2S select REGMAP_MMIO tristate
sound/soc/sirf/Makefile +2 -0
@@ -1,7 +1,9 @@ snd-soc-sirf-audio-objs := sirf-audio.o snd-soc-sirf-audio-port-objs := sirf-audio-port.o +snd-soc-sirf-hdmi-objs := sirf-hdmi.o snd-soc-sirf-i2s-objs := sirf-i2s.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO) += snd-soc-sirf-audio.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO_PORT) += snd-soc-sirf-audio-port.o +obj-$(CONFIG_SND_SOC_SIRF_HDMI) += snd-soc-sirf-hdmi.o obj-$(CONFIG_SND_SOC_SIRF_I2S) += snd-soc-sirf-i2s.o
sound/soc/sirf/sirf-hdmi.c new file +98 -0
98 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v5 6/7 ASoC: sirf: Add usp driver which is used by dsp mode
In reply to RongJun YingFrom: Rongjun Ying <[email protected]>
This patch adds ASoC support for SiRF SoCs USP(DSP mode) modules. Features include:
1. Only 1 channel support.
2. Support both master and slave mode.
---
-v5:
Drop all inlines.
.../devicetree/bindings/sound/sirf-usp.txt | 27 ++ sound/soc/sirf/Kconfig | 8 + sound/soc/sirf/Makefile | 2 + sound/soc/sirf/sirf-usp.c | 448 ++++++++++++++++++++ sound/soc/sirf/sirf-usp.h | 282 ++++++++++++ 5 files changed, 767 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-usp.txt create mode 100644 sound/soc/sirf/sirf-usp.c create mode 100644 sound/soc/sirf/sirf-usp.h
Documentation/devicetree/bindings/sound/sirf-usp.txt new file +27 -0
@@ -0,0 +1,27 @@ +* SiRF SoC USP module + +Required properties: +- compatible: "sirf,prima2-usp-pcm" +- reg: Base address and size entries: +- dmas: List of DMA controller phandle and DMA request line ordered pairs. +- dma-names: Identifier string for each DMA request line in the dmas property. + These strings correspond 1:1 with the ordered pairs in dmas. + + One of the DMA channels will be responsible for transmission (should be + named "tx") and one for reception (should be named "rx"). + +- clocks: USP controller clock source +- pinctrl-names: Must contain a "default" entry. +- pinctrl-NNN: One property must exist for each entry in pinctrl-names. + +Example: + +usp1: usp@b0090000 { + compatible = "sirf,prima2-usp-pcm"; + reg = <0xb0090000 0x10000>; + clocks = <&clks 29>; + dmas = <&dmac0 14>, <&dmac0 15>; + dma-names = "rx", "tx"; + pinctrl-names = "default"; + pinctrl-0 = <&usp0_only_utfs_pins_a>; +};
sound/soc/sirf/Kconfig +8 -0
@@ -13,6 +13,10 @@ config SND_SOC_SIRF_AUDIO_PORT select REGMAP_MMIO tristate +config SND_SOC_SIRF_I2S + select REGMAP_MMIO + tristate + config SND_SOC_SIRF_HDMI tristate "SoC Audio support for SiRF HDMI" depends on SND_SOC_SIRF
@@ -22,3 +26,7 @@ config SND_SOC_SIRF_HDMI config SND_SOC_SIRF_I2S select REGMAP_MMIO tristate + +config SND_SOC_SIRF_USP + select REGMAP_MMIO + tristate
sound/soc/sirf/Makefile +2 -0
@@ -2,8 +2,10 @@ snd-soc-sirf-audio-objs := sirf-audio.o snd-soc-sirf-audio-port-objs := sirf-audio-port.o snd-soc-sirf-hdmi-objs := sirf-hdmi.o snd-soc-sirf-i2s-objs := sirf-i2s.o +snd-soc-sirf-usp-objs := sirf-usp.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO) += snd-soc-sirf-audio.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO_PORT) += snd-soc-sirf-audio-port.o obj-$(CONFIG_SND_SOC_SIRF_HDMI) += snd-soc-sirf-hdmi.o obj-$(CONFIG_SND_SOC_SIRF_I2S) += snd-soc-sirf-i2s.o +obj-$(CONFIG_SND_SOC_SIRF_USP) += snd-soc-sirf-usp.o
sound/soc/sirf/sirf-usp.c new file +448 -0
448 lines not on this page · raw message
sound/soc/sirf/sirf-usp.h new file +282 -0
282 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v5 7/7 ASoC: sirf: Add bt-sco card
In reply to RongJun YingFrom: Rongjun Ying <[email protected]>
This connects platform DAI, USP(DSP mode) CPU DAI and bt-sco Codec DAI together and works as a mach driver.
--- .../devicetree/bindings/sound/sirf-bt-sco.txt | 18 ++++ sound/soc/sirf/Kconfig | 10 +- sound/soc/sirf/Makefile | 2 + sound/soc/sirf/sirf-bt-sco.c | 99 ++++++++++++++++++++ 4 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-bt-sco.txt create mode 100644 sound/soc/sirf/sirf-bt-sco.c
Documentation/devicetree/bindings/sound/sirf-bt-sco.txt new file +18 -0
@@ -0,0 +1,18 @@ +* SiRF atlas6/prima2 and bt-sco based audio setups + +Required properties: +- compatible: "sirf,sirf-bt-sco" +- sirf,usp-controller: The phandle of the SiRF usp controller. + +Optional properties: +- bt-sco-master: The phandle of who is master, if set, + the codec is master, Otherwiss, the soc is master. + +Example: + +sirf-bt-sco { + compatible = "sirf,sirf-bt-sco"; + sirf,usp-controller = <&usp0>; + bt-sco-master; +}; +
sound/soc/sirf/Kconfig +6 -4
@@ -13,6 +13,12 @@ config SND_SOC_SIRF_AUDIO_PORT select REGMAP_MMIO tristate +config SND_SOC_SIRF_BT_SCO + tristate "SoC Audio support for BT SCO" + depends on SND_SOC_SIRF + select SND_SOC_BT_SCO + select SND_SOC_SIRF_USP + config SND_SOC_SIRF_I2S select REGMAP_MMIO tristate
@@ -23,10 +29,6 @@ config SND_SOC_SIRF_HDMI select SND_SOC_SIRF_I2S select SND_SOC_HDMI_CODEC -config SND_SOC_SIRF_I2S - select REGMAP_MMIO - tristate - config SND_SOC_SIRF_USP select REGMAP_MMIO tristate
sound/soc/sirf/Makefile +2 -0
@@ -1,11 +1,13 @@ snd-soc-sirf-audio-objs := sirf-audio.o snd-soc-sirf-audio-port-objs := sirf-audio-port.o +snd-soc-sirf-bt-sco-objs := sirf-bt-sco.o snd-soc-sirf-hdmi-objs := sirf-hdmi.o snd-soc-sirf-i2s-objs := sirf-i2s.o snd-soc-sirf-usp-objs := sirf-usp.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO) += snd-soc-sirf-audio.o obj-$(CONFIG_SND_SOC_SIRF_AUDIO_PORT) += snd-soc-sirf-audio-port.o +obj-$(CONFIG_SND_SOC_SIRF_BT_SCO) += snd-soc-sirf-bt-sco.o obj-$(CONFIG_SND_SOC_SIRF_HDMI) += snd-soc-sirf-hdmi.o obj-$(CONFIG_SND_SOC_SIRF_I2S) += snd-soc-sirf-i2s.o obj-$(CONFIG_SND_SOC_SIRF_USP) += snd-soc-sirf-usp.o
sound/soc/sirf/sirf-bt-sco.c new file +99 -0
99 lines not on this page · raw message
Signature · 1 line
1.7.5.4