Skip to content

Commit

Permalink
Merge tag 'asoc-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/broonie/sound into for-linus

ASoC: Updates for v4.11

Another release that's mainly focused on drivers rather than core
changes, highlights include:

 - A huge batch of updates to the Intel drivers, mainly around
   DisplayPort and HDMI with some additional board support too.
 - Channel mapping support for HDMI.
 - Support for AllWinner A31 and A33, Everest Semiconductor ES8328,
   Nuvoton NAU8540.
  • Loading branch information
tiwai committed Feb 20, 2017
2 parents d2bb390 + 141dee7 commit 4e25d30
Show file tree
Hide file tree
Showing 147 changed files with 5,466 additions and 1,521 deletions.
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/misc/atmel-ssc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Optional properties:
this parameter to choose where the clock from.
- By default the clock is from TK pin, if the clock from RK pin, this
property is needed.
- #sound-dai-cells: Should contain <0>.
- This property makes the SSC into an automatically registered DAI.

Examples:
- PDC transfer:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Devicetree bindings for the Axentia TSE-850 audio complex

Required properties:
- compatible: "axentia,tse850-pcm5142"
- axentia,ssc-controller: The phandle of the atmel SSC controller used as
cpu dai.
- axentia,cpu-dai: The phandle of the cpu dai.
- axentia,audio-codec: The phandle of the PCM5142 codec.
- axentia,add-gpios: gpio specifier that controls the mixer.
- axentia,loop1-gpios: gpio specifier that controls loop relays on channel 1.
Expand Down Expand Up @@ -43,6 +42,12 @@ the PCM5142 codec.

Example:

&ssc0 {
#sound-dai-cells = <0>;

status = "okay";
};

&i2c {
codec: pcm5142@4c {
compatible = "ti,pcm5142";
Expand Down Expand Up @@ -77,7 +82,7 @@ Example:
sound {
compatible = "axentia,tse850-pcm5142";

axentia,ssc-controller = <&ssc0>;
axentia,cpu-dai = <&ssc0>;
axentia,audio-codec = <&codec>;

axentia,add-gpios = <&pioA 8 GPIO_ACTIVE_LOW>;
Expand Down
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/sound/es8328.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This device supports both I2C and SPI.

Required properties:

- compatible : "everest,es8328"
- compatible : Should be "everest,es8328" or "everest,es8388"
- DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
- AVDD-supply : Regulator providing analog supply voltage 3.3V
- PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
Expand Down
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Required properties:
- compatible = "mediatek,mt2701-audio";
- reg: register location and size
- interrupts: Should contain AFE interrupt
- power-domains: should define the power domain
- clock-names: should have these clock names:
"infra_sys_audio_clk",
"top_audio_mux1_sel",
Expand Down Expand Up @@ -58,6 +59,7 @@ Example:
<0 0x112A0000 0 0x20000>;
interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
<GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
clocks = <&infracfg CLK_INFRA_AUDIO>,
<&topckgen CLK_TOP_AUD_MUX1_SEL>,
<&topckgen CLK_TOP_AUD_MUX2_SEL>,
Expand Down
16 changes: 16 additions & 0 deletions Documentation/devicetree/bindings/sound/nau8540.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NAU85L40 audio CODEC

This device supports I2C only.

Required properties:

- compatible : "nuvoton,nau8540"

- reg : the I2C address of the device.

Example:

codec: nau8540@1c {
compatible = "nuvoton,nau8540";
reg = <0x1c>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ROCKCHIP RK3288 with HDMI and analog audio

Required properties:
- compatible: "rockchip,rk3288-hdmi-analog"
- rockchip,model: The user-visible name of this sound complex
- rockchip,i2s-controller: The phandle of the Rockchip I2S controller that's
connected to the CODEC
- rockchip,audio-codec: The phandle of the analog audio codec.
- rockchip,routing: A list of the connections between audio components.
Each entry is a pair of strings, the first being the
connection's sink, the second being the connection's
source. For this driver the first string should always be
"Analog".

Optionnal properties:
- rockchip,hp-en-gpios = The phandle of the GPIO that power up/down the
headphone (when the analog output is an headphone).
- rockchip,hp-det-gpios = The phandle of the GPIO that detects the headphone
(when the analog output is an headphone).
- pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt

Example:

sound {
compatible = "rockchip,rockchip-audio-es8388";
rockchip,model = "Analog audio output";
rockchip,i2s-controller = <&i2s>;
rockchip,audio-codec = <&es8388>;
rockchip,routing = "Analog", "LOUT2",
"Analog", "ROUT2";
rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&headphone>;
};

5 changes: 5 additions & 0 deletions Documentation/devicetree/bindings/sound/sun4i-i2s.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Required properties:

- compatible: should be one of the followings
- "allwinner,sun4i-a10-i2s"
- "allwinner,sun6i-a31-i2s"
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: should contain the I2S interrupt.
Expand All @@ -19,6 +20,10 @@ Required properties:
- "mod" : module clock for the I2S controller
- #sound-dai-cells : Must be equal to 0

Required properties for the following compatibles:
- "allwinner,sun6i-a31-i2s"
- resets: phandle to the reset line for this codec

Example:

i2s0: i2s@01c22400 {
Expand Down
63 changes: 63 additions & 0 deletions Documentation/devicetree/bindings/sound/sun8i-a33-codec.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Allwinner SUN8I audio codec
------------------------------------

On Sun8i-A33 SoCs, the audio is separated in different parts:
- A DAI driver. It uses the "sun4i-i2s" driver which is
documented here:
Documentation/devicetree/bindings/sound/sun4i-i2s.txt
- An analog part of the codec which is handled as PRCM registers.
See Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
- An digital part of the codec which is documented in this current
binding documentation.
- And finally, an audio card which links all the above components.
The simple-audio card will be used.
See Documentation/devicetree/bindings/sound/simple-card.txt

This bindings documentation exposes Sun8i codec (digital part).

Required properties:
- compatible: must be "allwinner,sun8i-a33-codec"
- reg: must contain the registers location and length
- interrupts: must contain the codec interrupt
- clocks: a list of phandle + clock-specifer pairs, one for each entry
in clock-names.
- clock-names: should contain followings:
- "bus": the parent APB clock for this controller
- "mod": the parent module clock

Here is an example to add a sound card and the codec binding on sun8i SoCs that
are similar to A33 using simple-card:

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "sun8i-a33-audio";
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&link_codec>;
simple-audio-card,bitclock-master = <&link_codec>;
simple-audio-card,mclk-fs = <512>;
simple-audio-card,aux-devs = <&codec_analog>;
simple-audio-card,routing =
"Left DAC", "Digital Left DAC",
"Right DAC", "Digital Right DAC";

simple-audio-card,cpu {
sound-dai = <&dai>;
};

link_codec: simple-audio-card,codec {
sound-dai = <&codec>;
};

soc@01c00000 {
[...]

audio-codec@1c22e00 {
#sound-dai-cells = <0>;
compatible = "allwinner,sun8i-a33-codec";
reg = <0x01c22e00 0x400>;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
clock-names = "bus", "mod";
};
};

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Required properties:
- compatible : should be one of the following:
- "allwinner,sun4i-a10-spdif": for the Allwinner A10 SoC
- "allwinner,sun6i-a31-spdif": for the Allwinner A31 SoC
- "allwinner,sun8i-h3-spdif": for the Allwinner H3 SoC

- reg : Offset and length of the register set for the device.

Expand Down
14 changes: 8 additions & 6 deletions Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
ZTE ZX296702 I2S controller

Required properties:
- compatible : Must be "zte,zx296702-i2s"
- compatible : Must be one of:
"zte,zx296718-i2s", "zte,zx296702-i2s"
"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.
- clock-names: "wclk" for the wclk, "pclk" for the pclk 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"
Expand All @@ -16,12 +18,12 @@ please check:
* dma/dma.txt

Example:
i2s0: i2s0@0b005000 {
i2s0: i2s@b005000 {
#sound-dai-cells = <0>;
compatible = "zte,zx296702-i2s";
compatible = "zte,zx296718-i2s", "zte,zx296702-i2s";
reg = <0x0b005000 0x1000>;
clocks = <&lsp0clk ZX296702_I2S0_DIV>;
clock-names = "tx";
clocks = <&audiocrm AUDIO_I2S0_WCLK>, <&audiocrm AUDIO_I2S0_PCLK>;
clock-names = "wclk", "pclk";
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&dma 5>, <&dma 6>;
dma-names = "tx", "rx";
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-s3c64xx/dev-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ static struct s3c_audio_pdata i2sv4_pdata = {
.dma_playback = DMACH_HSI_I2SV40_TX,
.dma_capture = DMACH_HSI_I2SV40_RX,
.type = {
.i2s = {
.quirks = QUIRK_PRI_6CHAN,
},
.quirks = QUIRK_PRI_6CHAN,
},
};

Expand Down
50 changes: 50 additions & 0 deletions drivers/misc/atmel-ssc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include <linux/of.h>

#include "../../sound/soc/atmel/atmel_ssc_dai.h"

/* Serialize access to ssc_list and user count */
static DEFINE_SPINLOCK(user_lock);
static LIST_HEAD(ssc_list);
Expand Down Expand Up @@ -145,6 +147,49 @@ static inline const struct atmel_ssc_platform_data * __init
platform_get_device_id(pdev)->driver_data;
}

#ifdef CONFIG_SND_ATMEL_SOC_SSC
static int ssc_sound_dai_probe(struct ssc_device *ssc)
{
struct device_node *np = ssc->pdev->dev.of_node;
int ret;
int id;

ssc->sound_dai = false;

if (!of_property_read_bool(np, "#sound-dai-cells"))
return 0;

id = of_alias_get_id(np, "ssc");
if (id < 0)
return id;

ret = atmel_ssc_set_audio(id);
ssc->sound_dai = !ret;

return ret;
}

static void ssc_sound_dai_remove(struct ssc_device *ssc)
{
if (!ssc->sound_dai)
return;

atmel_ssc_put_audio(of_alias_get_id(ssc->pdev->dev.of_node, "ssc"));
}
#else
static inline int ssc_sound_dai_probe(struct ssc_device *ssc)
{
if (of_property_read_bool(ssc->pdev->dev.of_node, "#sound-dai-cells"))
return -ENOTSUPP;

return 0;
}

static inline void ssc_sound_dai_remove(struct ssc_device *ssc)
{
}
#endif

static int ssc_probe(struct platform_device *pdev)
{
struct resource *regs;
Expand Down Expand Up @@ -204,13 +249,18 @@ static int ssc_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "Atmel SSC device at 0x%p (irq %d)\n",
ssc->regs, ssc->irq);

if (ssc_sound_dai_probe(ssc))
dev_err(&pdev->dev, "failed to auto-setup ssc for audio\n");

return 0;
}

static int ssc_remove(struct platform_device *pdev)
{
struct ssc_device *ssc = platform_get_drvdata(pdev);

ssc_sound_dai_remove(ssc);

spin_lock(&user_lock);
list_del(&ssc->list);
spin_unlock(&user_lock);
Expand Down
13 changes: 13 additions & 0 deletions include/drm/drm_edid.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ struct detailed_timing {
# define DRM_ELD_AUD_SYNCH_DELAY_MAX 0xfa /* 500 ms */

#define DRM_ELD_SPEAKER 7
# define DRM_ELD_SPEAKER_MASK 0x7f
# define DRM_ELD_SPEAKER_RLRC (1 << 6)
# define DRM_ELD_SPEAKER_FLRC (1 << 5)
# define DRM_ELD_SPEAKER_RC (1 << 4)
Expand Down Expand Up @@ -413,6 +414,18 @@ static inline int drm_eld_size(const uint8_t *eld)
return DRM_ELD_HEADER_BLOCK_SIZE + eld[DRM_ELD_BASELINE_ELD_LEN] * 4;
}

/**
* drm_eld_get_spk_alloc - Get speaker allocation
* @eld: pointer to an ELD memory structure
*
* The returned value is the speakers mask. User has to use %DRM_ELD_SPEAKER
* field definitions to identify speakers.
*/
static inline u8 drm_eld_get_spk_alloc(const uint8_t *eld)
{
return eld[DRM_ELD_SPEAKER] & DRM_ELD_SPEAKER_MASK;
}

/**
* drm_eld_get_conn_type - Get device type hdmi/dp connected
* @eld: pointer to an ELD memory structure
Expand Down
1 change: 1 addition & 0 deletions include/linux/atmel-ssc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ struct ssc_device {
int user;
int irq;
bool clk_from_rk_pin;
bool sound_dai;
};

struct ssc_device * __must_check ssc_request(unsigned int ssc_num);
Expand Down
6 changes: 2 additions & 4 deletions include/linux/platform_data/asoc-s3c.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

extern void s3c64xx_ac97_setup_gpio(int);

struct samsung_i2s {
struct samsung_i2s_type {
/* If the Primary DAI has 5.1 Channels */
#define QUIRK_PRI_6CHAN (1 << 0)
/* If the I2S block has a Stereo Overlay Channel */
Expand Down Expand Up @@ -47,7 +47,5 @@ struct s3c_audio_pdata {
void *dma_capture;
void *dma_play_sec;
void *dma_capture_mic;
union {
struct samsung_i2s i2s;
} type;
struct samsung_i2s_type type;
};
Loading

0 comments on commit 4e25d30

Please sign in to comment.