Skip to content

Commit

Permalink
Merge tag 'asoc-v4.2-2' into asoc-next
Browse files Browse the repository at this point in the history
ASoC: Further updates for v4.2

There's a bunch of additional updates and fixes that came in since my
orignal pull request here, including DT support for rt5645 and fairly
large serieses of cleanups and improvements to tas2552 and rcar.

# gpg: Signature made Mon 22 Jun 2015 10:24:48 BST using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
  • Loading branch information
Mark Brown committed Jun 22, 2015
2 parents 89fc594 + c99d49a commit 25305dc
Show file tree
Hide file tree
Showing 59 changed files with 3,713 additions and 891 deletions.
13 changes: 13 additions & 0 deletions Documentation/devicetree/bindings/sound/mt8173-max98090.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
MT8173 with MAX98090 CODEC

Required properties:
- compatible : "mediatek,mt8173-max98090"
- mediatek,audio-codec: the phandle of the MAX98090 audio codec

Example:

sound {
compatible = "mediatek,mt8173-max98090";
mediatek,audio-codec = <&max98090>;
};

13 changes: 13 additions & 0 deletions Documentation/devicetree/bindings/sound/mt8173-rt5650-rt5676.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
MT8173 with RT5650 RT5676 CODECS

Required properties:
- compatible : "mediatek,mt8173-rt5650-rt5676"
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs

Example:

sound {
compatible = "mediatek,mt8173-rt5650-rt5676";
mediatek,audio-codec = <&rt5650 &rt5676>;
};

45 changes: 45 additions & 0 deletions Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Mediatek AFE PCM controller

Required properties:
- compatible = "mediatek,mt8173-afe-pcm";
- reg: register location and size
- interrupts: Should contain AFE interrupt
- clock-names: should have these clock names:
"infra_sys_audio_clk",
"top_pdn_audio",
"top_pdn_aud_intbus",
"bck0",
"bck1",
"i2s0_m",
"i2s1_m",
"i2s2_m",
"i2s3_m",
"i2s3_b";

Example:

afe: mt8173-afe-pcm@11220000 {
compatible = "mediatek,mt8173-afe-pcm";
reg = <0 0x11220000 0 0x1000>;
interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_FALLING>;
clocks = <&infracfg INFRA_AUDIO>,
<&topckgen TOP_AUDIO_SEL>,
<&topckgen TOP_AUD_INTBUS_SEL>,
<&topckgen TOP_APLL1_DIV0>,
<&topckgen TOP_APLL2_DIV0>,
<&topckgen TOP_I2S0_M_CK_SEL>,
<&topckgen TOP_I2S1_M_CK_SEL>,
<&topckgen TOP_I2S2_M_CK_SEL>,
<&topckgen TOP_I2S3_M_CK_SEL>,
<&topckgen TOP_I2S3_B_CK_SEL>;
clock-names = "infra_sys_audio_clk",
"top_pdn_audio",
"top_pdn_aud_intbus",
"bck0",
"bck1",
"i2s0_m",
"i2s1_m",
"i2s2_m",
"i2s3_m",
"i2s3_b";
};
60 changes: 60 additions & 0 deletions Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
* Qualcomm Technologies APQ8016 SBC ASoC machine driver

This node models the Qualcomm Technologies APQ8016 SBC ASoC machine driver

Required properties:

- compatible : "qcom,apq8016-sbc-sndcard"

- pinctrl-N : One property must exist for each entry in
pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
for details of the property values.
- pinctrl-names : Must contain a "default" entry.
- reg : Must contain an address for each entry in reg-names.
- reg-names : A list which must include the following entries:
* "mic-iomux"
* "spkr-iomux"
- qcom,model : Name of the sound card.

Dai-link subnode properties and subnodes:

Required dai-link subnodes:

- cpu : CPU sub-node
- codec : CODEC sub-node

Required CPU/CODEC subnodes properties:

-link-name : Name of the dai link.
-sound-dai : phandle and port of CPU/CODEC
-capture-dai : phandle and port of CPU/CODEC

Example:

sound: sound {
compatible = "qcom,apq8016-sbc-sndcard";
reg = <0x07702000 0x4>, <0x07702004 0x4>;
reg-names = "mic-iomux", "spkr-iomux";
qcom,model = "DB410c";

/* I2S - Internal codec */
internal-dai-link@0 {
cpu { /* PRIMARY */
sound-dai = <&lpass MI2S_PRIMARY>;
};
codec {
sound-dai = <&wcd_codec 0>;
};
};

/* External Primary or External Secondary -ADV7533 HDMI */
external-dai-link@0 {
link-name = "ADV7533";
cpu { /* QUAT */
sound-dai = <&lpass MI2S_QUATERNARY>;
};
codec {
sound-dai = <&adv_bridge 0>;
};
};
};
72 changes: 72 additions & 0 deletions Documentation/devicetree/bindings/sound/rt5645.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
RT5650/RT5645 audio CODEC

This device supports I2C only.

Required properties:

- compatible : One of "realtek,rt5645" or "realtek,rt5650".

- reg : The I2C address of the device.

- interrupts : The CODEC's interrupt output.

Optional properties:

- hp-detect-gpios:
a GPIO spec for the external headphone detect pin. If jd-mode = 0,
we will get the JD status by getting the value of hp-detect-gpios.

- realtek,in2-differential
Boolean. Indicate MIC2 input are differential, rather than single-ended.

- realtek,dmic1-data-pin
0: dmic1 is not used
1: using IN2P pin as dmic1 data pin
2: using GPIO6 pin as dmic1 data pin
3: using GPIO10 pin as dmic1 data pin
4: using GPIO12 pin as dmic1 data pin

- realtek,dmic2-data-pin
0: dmic2 is not used
1: using IN2N pin as dmic2 data pin
2: using GPIO5 pin as dmic2 data pin
3: using GPIO11 pin as dmic2 data pin

-- realtek,jd-mode : The JD mode of rt5645/rt5650
0 : rt5645/rt5650 JD function is not used
1 : Mode-0 (VDD=3.3V), two port jack detection
2 : Mode-1 (VDD=3.3V), one port jack detection
3 : Mode-2 (VDD=1.8V), one port jack detection

Pins on the device (for linking into audio routes) for RT5645/RT5650:

* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* Haptic Generator
* HPOL
* HPOR
* LOUTL
* LOUTR
* PDM1L
* PDM1R
* SPOL
* SPOR

Example:

codec: rt5650@1a {
compatible = "realtek,rt5650";
reg = <0x1a>;
hp-detect-gpios = <&gpio 19 0>;
interrupt-parent = <&gpio>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
realtek,dmic-en = "true";
realtek,en-jd-func = "true";
realtek,jd-mode = <3>;
};
6 changes: 5 additions & 1 deletion Documentation/devicetree/bindings/sound/simple-card.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Optional properties:
connection's sink, the second being the connection's
source.
- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
mclk.
mclk. When defined, mclk-fs property defined in
dai-link sub nodes are ignored.
- simple-audio-card,hp-det-gpio : Reference to GPIO that signals when
headphones are attached.
- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
Expand Down Expand Up @@ -55,6 +56,9 @@ Optional dai-link subnode properties:
dai-link uses bit clock inversion.
- frame-inversion : bool property. Add this if the
dai-link uses frame clock inversion.
- mclk-fs : Multiplication factor between stream
rate and codec mclk, applied only for
the dai-link.

For backward compatibility the frame-master and bitclock-master
properties can be used as booleans in codec subnode to indicate if the
Expand Down
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/sound/tas2552.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Required properties:
Optional properties:
- enable-gpio - gpio pin to enable/disable the device

tas2552 can receive it's reference clock via MCLK, BCLK, IVCLKIN pin or use the
internal 1.8MHz. This CLKIN is used by the PLL. In addition to PLL, the PDM
reference clock is also selectable: PLL, IVCLKIN, BCLK or MCLK.
For system integration the dt-bindings/sound/tas2552.h header file provides
defined values to selct and configure the PLL and PDM reference clocks.

Example:

tas2552: tas2552@41 {
Expand Down
3 changes: 0 additions & 3 deletions include/sound/rt5645.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ struct rt5645_platform_data {
unsigned int dmic2_data_pin;
/* 0 = IN2P; 1 = GPIO6; 2 = GPIO10; 3 = GPIO12 */

unsigned int hp_det_gpio;
bool gpio_hp_det_active_high;

unsigned int jd_mode;
};

Expand Down
1 change: 1 addition & 0 deletions sound/soc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ source "sound/soc/nuc900/Kconfig"
source "sound/soc/omap/Kconfig"
source "sound/soc/kirkwood/Kconfig"
source "sound/soc/intel/Kconfig"
source "sound/soc/mediatek/Kconfig"
source "sound/soc/mxs/Kconfig"
source "sound/soc/pxa/Kconfig"
source "sound/soc/qcom/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions sound/soc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ obj-$(CONFIG_SND_SOC) += dwc/
obj-$(CONFIG_SND_SOC) += fsl/
obj-$(CONFIG_SND_SOC) += jz4740/
obj-$(CONFIG_SND_SOC) += intel/
obj-$(CONFIG_SND_SOC) += mediatek/
obj-$(CONFIG_SND_SOC) += mxs/
obj-$(CONFIG_SND_SOC) += nuc900/
obj-$(CONFIG_SND_SOC) += omap/
Expand Down
25 changes: 17 additions & 8 deletions sound/soc/atmel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,32 @@ config SND_ATMEL_SOC
if SND_ATMEL_SOC

config SND_ATMEL_SOC_PDC
bool
tristate
default m if SND_ATMEL_SOC_SSC_PDC=m && SND_ATMEL_SOC_SSC=m
default y if SND_ATMEL_SOC_SSC_PDC=y || (SND_ATMEL_SOC_SSC_PDC=m && SND_ATMEL_SOC_SSC=y)

config SND_ATMEL_SOC_SSC_PDC
tristate

config SND_ATMEL_SOC_DMA
bool
tristate
select SND_SOC_GENERIC_DMAENGINE_PCM
default m if SND_ATMEL_SOC_SSC_DMA=m && SND_ATMEL_SOC_SSC=m
default y if SND_ATMEL_SOC_SSC_DMA=y || (SND_ATMEL_SOC_SSC_DMA=m && SND_ATMEL_SOC_SSC=y)

config SND_ATMEL_SOC_SSC_DMA
tristate

config SND_ATMEL_SOC_SSC
tristate
default y if SND_ATMEL_SOC_SSC_DMA=y || SND_ATMEL_SOC_SSC_PDC=y
default m if SND_ATMEL_SOC_SSC_DMA=m || SND_ATMEL_SOC_SSC_PDC=m

config SND_AT91_SOC_SAM9G20_WM8731
tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board"
depends on ARCH_AT91 || COMPILE_TEST
depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI
select SND_ATMEL_SOC_PDC
select SND_ATMEL_SOC_SSC
select SND_ATMEL_SOC_SSC_PDC
select SND_SOC_WM8731
help
Say Y if you want to add support for SoC audio on WM8731-based
Expand All @@ -33,8 +44,7 @@ config SND_ATMEL_SOC_WM8904
tristate "Atmel ASoC driver for boards using WM8904 codec"
depends on ARCH_AT91 || COMPILE_TEST
depends on ATMEL_SSC && I2C
select SND_ATMEL_SOC_SSC
select SND_ATMEL_SOC_DMA
select SND_ATMEL_SOC_SSC_DMA
select SND_SOC_WM8904
help
Say Y if you want to add support for Atmel ASoC driver for boards using
Expand All @@ -44,8 +54,7 @@ config SND_AT91_SOC_SAM9X5_WM8731
tristate "SoC Audio support for WM8731-based at91sam9x5 board"
depends on ARCH_AT91 || COMPILE_TEST
depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI
select SND_ATMEL_SOC_SSC
select SND_ATMEL_SOC_DMA
select SND_ATMEL_SOC_SSC_DMA
select SND_SOC_WM8731
help
Say Y if you want to add support for audio SoC on an
Expand Down
8 changes: 5 additions & 3 deletions sound/soc/atmel/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# AT91 Platform Support
snd-soc-atmel-pcm-$(CONFIG_SND_ATMEL_SOC_PDC) := atmel-pcm-pdc.o
snd-soc-atmel-pcm-$(CONFIG_SND_ATMEL_SOC_DMA) += atmel-pcm-dma.o
snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o $(snd-soc-atmel-pcm-y)
snd-soc-atmel-pcm-pdc-objs := atmel-pcm-pdc.o
snd-soc-atmel-pcm-dma-objs := atmel-pcm-dma.o
snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o

obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel_ssc_dai.o

# AT91 Machine Support
Expand Down
5 changes: 5 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,11 @@ config SND_SOC_RL6231
default m if SND_SOC_RT5670=m
default m if SND_SOC_RT5677=m

config SND_SOC_RL6347A
tristate
default y if SND_SOC_RT286=y
default m if SND_SOC_RT286=m

config SND_SOC_RT286
tristate
depends on I2C
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ snd-soc-pcm512x-objs := pcm512x.o
snd-soc-pcm512x-i2c-objs := pcm512x-i2c.o
snd-soc-pcm512x-spi-objs := pcm512x-spi.o
snd-soc-rl6231-objs := rl6231.o
snd-soc-rl6347a-objs := rl6347a.o
snd-soc-rt286-objs := rt286.o
snd-soc-rt5631-objs := rt5631.o
snd-soc-rt5640-objs := rt5640.o
Expand Down Expand Up @@ -263,6 +264,7 @@ obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o
obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o
obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o
obj-$(CONFIG_SND_SOC_RL6231) += snd-soc-rl6231.o
obj-$(CONFIG_SND_SOC_RL6347A) += snd-soc-rl6347a.o
obj-$(CONFIG_SND_SOC_RT286) += snd-soc-rt286.o
obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o
obj-$(CONFIG_SND_SOC_RT5640) += snd-soc-rt5640.o
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/max98090.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "max98090.h"

/* Allows for sparsely populated register maps */
static struct reg_default max98090_reg[] = {
static const struct reg_default max98090_reg[] = {
{ 0x00, 0x00 }, /* 00 Software Reset */
{ 0x03, 0x04 }, /* 03 Interrupt Masks */
{ 0x04, 0x00 }, /* 04 System Clock Quick */
Expand Down Expand Up @@ -2704,7 +2704,7 @@ static const struct of_device_id max98090_of_match[] = {
MODULE_DEVICE_TABLE(of, max98090_of_match);

#ifdef CONFIG_ACPI
static struct acpi_device_id max98090_acpi_match[] = {
static const struct acpi_device_id max98090_acpi_match[] = {
{ "193C9890", MAX98090 },
{ }
};
Expand Down
Loading

0 comments on commit 25305dc

Please sign in to comment.