Skip to content

Commit 460dc1e

Browse files
committed
Merge tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "The biggest change in this update is the unification of HD-audio codec parsers. Now the HD-audio codec is parsed in a generic parser code which is invoked by each HD-audio codec driver. Some background information is found in David Henningsson's blog entry: http://voices.canonical.com/david.henningsson/2013/01/18/upcoming-changes-to-the-intel-hda-drivers/ Other than that, some random updates/fixes like USB-audio and a bunch of small AoC updates as usual. Highlights: - Unification of HD-audio parser code (aka generic parser) - Support of new Intel HD-audio controller, new IDT codecs - Fixes for HD-audio HDMI audio hotplug - Haswell HDMI audio fixup - Support of Creative CA0132 DSP code - A few fixes of HDSP driver - USB-audio fix for Roland A-PRO, M-Audio FT C600 - Support PM for aloop driver (and fixes Oops) - Compress API updates for gapless playback support For ASoC part: - Support for a wider range of hardware in the compressed stream code - The ability to mute capture streams as well as playback streams while inactive - DT support for AK4642, FSI, Samsung I2S and WM8962 - AC'97 support for Tegra - New driver for max98090, replacing the stub which was there - A new driver from Dialog Note that due to dependencies, DTification of DMA support for Samsung platforms (used only by the and I2S driver and SPI) is merged here as well." Fix up trivial conflict in drivers/spi/spi-s3c64xx.c due to removed code being changed. * tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (453 commits) ALSA: usb: Fix Processing Unit Descriptor parsers ALSA: hda - hdmi: Notify userspace when ELD control changes ALSA: hda - hdmi: Protect ELD buffer ALSA: hda - hdmi: Refactor hdmi_eld into parsed_hdmi_eld ALSA: hda - hdmi: Do not expose eld data when eld is invalid ALSA: hda - hdmi: ELD shouldn't be valid after unplug ALSA: hda - Fix the silent speaker output on Fujitsu S7020 laptop ALSA: hda - add quirks for mute LED on two HP machines ALSA: usb/quirks, fix out-of-bounds access ASoC: codecs: Add da7213 codec ALSA: au88x0 - Define channel map for au88x0 ALSA: compress: add support for gapless playback ALSA: hda - Remove speaker clicks on CX20549 ALSA: hda - Disable runtime PM for Intel 5 Series/3400 ALSA: hda - Increase badness for missing multi-io ASoC: arizona: Automatically manage input mutes ALSA: hda - Fix broken workaround for HDMI/SPDIF conflicts ALSA: hda/ca0132 - Add missing \n to debug prints ALSA: hda/ca0132 - Fix type of INVALID_CHIP_ADDRESS ALSA: hda - update documentation for no-primary-hp fixup ...
2 parents 024e4ec + b531f81 commit 460dc1e

175 files changed

Lines changed: 26301 additions & 19658 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/DocBook/writing-an-alsa-driver.tmpl‎

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -871,9 +871,8 @@
871871
<para>
872872
This function itself doesn't allocate the data space. The data
873873
must be allocated manually beforehand, and its pointer is passed
874-
as the argument. This pointer is used as the
875-
(<parameter>chip</parameter> identifier in the above example)
876-
for the instance.
874+
as the argument. This pointer (<parameter>chip</parameter> in the
875+
above example) is used as the identifier for the instance.
877876
</para>
878877

879878
<para>
@@ -2304,7 +2303,7 @@ struct _snd_pcm_runtime {
23042303
<constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you
23052304
have to specify whether the mmap is supported and which
23062305
interleaved format is supported.
2307-
When the is supported, add the
2306+
When the hardware supports mmap, add the
23082307
<constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the
23092308
hardware supports the interleaved or the non-interleaved
23102309
formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or
@@ -2898,7 +2897,7 @@ struct _snd_pcm_runtime {
28982897

28992898
<para>
29002899
When the pcm supports the pause operation (given in the info
2901-
field of the hardware table), the <constant>PAUSE_PUSE</constant>
2900+
field of the hardware table), the <constant>PAUSE_PUSH</constant>
29022901
and <constant>PAUSE_RELEASE</constant> commands must be
29032902
handled here, too. The former is the command to pause the pcm,
29042903
and the latter to restart the pcm again.
@@ -3085,7 +3084,7 @@ struct _snd_pcm_runtime {
30853084
<section id="pcm-interface-interrupt-handler-timer">
30863085
<title>High frequency timer interrupts</title>
30873086
<para>
3088-
This happense when the hardware doesn't generate interrupts
3087+
This happens when the hardware doesn't generate interrupts
30893088
at the period boundary but issues timer interrupts at a fixed
30903089
timer rate (e.g. es1968 or ymfpci drivers).
30913090
In this case, you need to check the current hardware
@@ -3251,18 +3250,19 @@ struct _snd_pcm_runtime {
32513250
<title>Example of Hardware Constraints for Channels</title>
32523251
<programlisting>
32533252
<![CDATA[
3254-
static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
3253+
static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
32553254
struct snd_pcm_hw_rule *rule)
32563255
{
32573256
struct snd_interval *c = hw_param_interval(params,
3258-
SNDRV_PCM_HW_PARAM_CHANNELS);
3257+
SNDRV_PCM_HW_PARAM_CHANNELS);
32593258
struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3260-
struct snd_mask fmt;
3259+
struct snd_interval ch;
32613260

3262-
snd_mask_any(&fmt); /* Init the struct */
3263-
if (c->min < 2) {
3264-
fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
3265-
return snd_mask_refine(f, &fmt);
3261+
snd_interval_any(&ch);
3262+
if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
3263+
ch.min = ch.max = 1;
3264+
ch.integer = 1;
3265+
return snd_interval_refine(c, &ch);
32663266
}
32673267
return 0;
32683268
}
@@ -3278,35 +3278,35 @@ struct _snd_pcm_runtime {
32783278
<programlisting>
32793279
<![CDATA[
32803280
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
3281-
hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT,
3282-
-1);
3281+
hw_rule_channels_by_format, NULL,
3282+
SNDRV_PCM_HW_PARAM_FORMAT, -1);
32833283
]]>
32843284
</programlisting>
32853285
</informalexample>
32863286
</para>
32873287

32883288
<para>
3289-
The rule function is called when an application sets the number of
3290-
channels. But an application can set the format before the number of
3291-
channels. Thus you also need to define the inverse rule:
3289+
The rule function is called when an application sets the PCM
3290+
format, and it refines the number of channels accordingly.
3291+
But an application may set the number of channels before
3292+
setting the format. Thus you also need to define the inverse rule:
32923293

32933294
<example>
3294-
<title>Example of Hardware Constraints for Channels</title>
3295+
<title>Example of Hardware Constraints for Formats</title>
32953296
<programlisting>
32963297
<![CDATA[
3297-
static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
3298+
static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
32983299
struct snd_pcm_hw_rule *rule)
32993300
{
33003301
struct snd_interval *c = hw_param_interval(params,
3301-
SNDRV_PCM_HW_PARAM_CHANNELS);
3302+
SNDRV_PCM_HW_PARAM_CHANNELS);
33023303
struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
3303-
struct snd_interval ch;
3304+
struct snd_mask fmt;
33043305

3305-
snd_interval_any(&ch);
3306-
if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
3307-
ch.min = ch.max = 1;
3308-
ch.integer = 1;
3309-
return snd_interval_refine(c, &ch);
3306+
snd_mask_any(&fmt); /* Init the struct */
3307+
if (c->min < 2) {
3308+
fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
3309+
return snd_mask_refine(f, &fmt);
33103310
}
33113311
return 0;
33123312
}
@@ -3321,8 +3321,8 @@ struct _snd_pcm_runtime {
33213321
<programlisting>
33223322
<![CDATA[
33233323
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
3324-
hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
3325-
-1);
3324+
hw_rule_format_by_channels, NULL,
3325+
SNDRV_PCM_HW_PARAM_CHANNELS, -1);
33263326
]]>
33273327
</programlisting>
33283328
</informalexample>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
AK4642 I2C transmitter
2+
3+
This device supports I2C mode only.
4+
5+
Required properties:
6+
7+
- compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648"
8+
- reg : The chip select number on the I2C bus
9+
10+
Example:
11+
12+
&i2c {
13+
ak4648: ak4648@0x12 {
14+
compatible = "asahi-kasei,ak4642";
15+
reg = <0x12>;
16+
};
17+
};

‎Documentation/devicetree/bindings/sound/cs4271.txt‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ Optional properties:
2020
!RESET pin
2121
- cirrus,amuteb-eq-bmutec: When given, the Codec's AMUTEB=BMUTEC flag
2222
is enabled.
23+
- cirrus,enable-soft-reset:
24+
The CS4271 requires its LRCLK and MCLK to be stable before its RESET
25+
line is de-asserted. That also means that clocks cannot be changed
26+
without putting the chip back into hardware reset, which also requires
27+
a complete re-initialization of all registers.
28+
29+
One (undocumented) workaround is to assert and de-assert the PDN bit
30+
in the MODE2 register. This workaround can be enabled with this DT
31+
property.
32+
33+
Note that this is not needed in case the clocks are stable
34+
throughout the entire runtime of the codec.
2335

2436
Examples:
2537

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
NVIDIA Tegra audio complex
2+
3+
Required properties:
4+
- compatible : "nvidia,tegra-audio-wm9712"
5+
- nvidia,model : The user-visible name of this sound complex.
6+
- nvidia,audio-routing : A list of the connections between audio components.
7+
Each entry is a pair of strings, the first being the connection's sink,
8+
the second being the connection's source. Valid names for sources and
9+
sinks are the WM9712's pins, and the jacks on the board:
10+
11+
WM9712 pins:
12+
13+
* MONOOUT
14+
* HPOUTL
15+
* HPOUTR
16+
* LOUT2
17+
* ROUT2
18+
* OUT3
19+
* LINEINL
20+
* LINEINR
21+
* PHONE
22+
* PCBEEP
23+
* MIC1
24+
* MIC2
25+
* Mic Bias
26+
27+
Board connectors:
28+
29+
* Headphone
30+
* LineIn
31+
* Mic
32+
33+
- nvidia,ac97-controller : The phandle of the Tegra AC97 controller
34+
35+
36+
Example:
37+
38+
sound {
39+
compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
40+
"nvidia,tegra-audio-wm9712";
41+
nvidia,model = "Toradex Colibri T20";
42+
43+
nvidia,audio-routing =
44+
"Headphone", "HPOUTL",
45+
"Headphone", "HPOUTR",
46+
"LineIn", "LINEINL",
47+
"LineIn", "LINEINR",
48+
"Mic", "MIC1";
49+
50+
nvidia,ac97-controller = <&ac97>;
51+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
NVIDIA Tegra 20 AC97 controller
2+
3+
Required properties:
4+
- compatible : "nvidia,tegra20-ac97"
5+
- reg : Should contain AC97 controller registers location and length
6+
- interrupts : Should contain AC97 interrupt
7+
- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
8+
request selector for the AC97 controller
9+
- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number
10+
of the GPIO used to reset the external AC97 codec
11+
- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number
12+
of the GPIO corresponding with the AC97 DAP _FS line
13+
Example:
14+
15+
ac97@70002000 {
16+
compatible = "nvidia,tegra20-ac97";
17+
reg = <0x70002000 0x200>;
18+
interrupts = <0 81 0x04>;
19+
nvidia,dma-request-selector = <&apbdma 12>;
20+
nvidia,codec-reset-gpio = <&gpio 170 0>;
21+
nvidia,codec-sync-gpio = <&gpio 120 0>;
22+
};

‎Documentation/devicetree/bindings/sound/omap-twl4030.txt‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,52 @@ Required properties:
66
- ti,mcbsp: phandle for the McBSP node
77
- ti,codec: phandle for the twl4030 audio node
88

9+
Optional properties:
10+
- ti,mcbsp-voice: phandle for the McBSP node connected to the voice port of twl
11+
- ti, jack-det-gpio: Jack detect GPIO
12+
- ti,audio-routing: List of connections between audio components.
13+
Each entry is a pair of strings, the first being the connection's sink,
14+
the second being the connection's source.
15+
If the routing is not provided all possible connection will be available
16+
17+
Available audio endpoints for the audio-routing table:
18+
19+
Board connectors:
20+
* Headset Stereophone
21+
* Earpiece Spk
22+
* Handsfree Spk
23+
* Ext Spk
24+
* Main Mic
25+
* Sub Mic
26+
* Headset Mic
27+
* Carkit Mic
28+
* Digital0 Mic
29+
* Digital1 Mic
30+
* Line In
31+
32+
twl4030 pins:
33+
* HSOL
34+
* HSOR
35+
* EARPIECE
36+
* HFL
37+
* HFR
38+
* PREDRIVEL
39+
* PREDRIVER
40+
* CARKITL
41+
* CARKITR
42+
* MAINMIC
43+
* SUBMIC
44+
* HSMIC
45+
* DIGIMIC0
46+
* DIGIMIC1
47+
* CARKITMIC
48+
* AUXL
49+
* AUXR
50+
51+
* Headset Mic Bias
52+
* Mic Bias 1 /* Used for Main Mic or Digimic0 */
53+
* Mic Bias 2 /* Used for Sub Mic or Digimic1 */
54+
955
Example:
1056

1157
sound {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Renesas FSI
2+
3+
Required properties:
4+
- compatible : "renesas,sh_fsi2" or "renesas,sh_fsi"
5+
- reg : Should contain the register physical address and length
6+
- interrupts : Should contain FSI interrupt
7+
8+
- fsia,spdif-connection : FSI is connected by S/PDFI
9+
- fsia,stream-mode-support : FSI supports 16bit stream mode.
10+
- fsia,use-internal-clock : FSI uses internal clock when master mode.
11+
12+
- fsib,spdif-connection : same as fsia
13+
- fsib,stream-mode-support : same as fsia
14+
- fsib,use-internal-clock : same as fsia
15+
16+
Example:
17+
18+
sh_fsi2: sh_fsi2@0xec230000 {
19+
compatible = "renesas,sh_fsi2";
20+
reg = <0xec230000 0x400>;
21+
interrupts = <0 146 0x4>;
22+
23+
fsia,spdif-connection;
24+
fsia,stream-mode-support;
25+
fsia,use-internal-clock;
26+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Samsung SMDK audio complex
2+
3+
Required properties:
4+
- compatible : "samsung,smdk-wm8994"
5+
- samsung,i2s-controller: The phandle of the Samsung I2S0 controller
6+
- samsung,audio-codec: The phandle of the WM8994 audio codec
7+
Example:
8+
9+
sound {
10+
compatible = "samsung,smdk-wm8994";
11+
12+
samsung,i2s-controller = <&i2s0>;
13+
samsung,audio-codec = <&wm8994>;
14+
};
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
* Samsung I2S controller
2+
3+
Required SoC Specific Properties:
4+
5+
- compatible : "samsung,i2s-v5"
6+
- reg: physical base address of the controller and length of memory mapped
7+
region.
8+
- dmas: list of DMA controller phandle and DMA request line ordered pairs.
9+
- dma-names: identifier string for each DMA request line in the dmas property.
10+
These strings correspond 1:1 with the ordered pairs in dmas.
11+
12+
Optional SoC Specific Properties:
13+
14+
- samsung,supports-6ch: If the I2S Primary sound source has 5.1 Channel
15+
support, this flag is enabled.
16+
- samsung,supports-rstclr: This flag should be set if I2S software reset bit
17+
control is required. When this flag is set I2S software reset bit will be
18+
enabled or disabled based on need.
19+
- samsung,supports-secdai:If I2S block has a secondary FIFO and internal DMA,
20+
then this flag is enabled.
21+
- samsung,idma-addr: Internal DMA register base address of the audio
22+
sub system(used in secondary sound source).
23+
24+
Required Board Specific Properties:
25+
26+
- gpios: The gpio specifier for data out,data in, LRCLK, CDCLK and SCLK
27+
interface lines. The format of the gpio specifier depends on the gpio
28+
controller.
29+
The syntax of samsung gpio specifier is
30+
<[phandle of the gpio controller node]
31+
[pin number within the gpio controller]
32+
[mux function]
33+
[flags and pull up/down]
34+
[drive strength]>
35+
36+
Example:
37+
38+
- SoC Specific Portion:
39+
40+
i2s@03830000 {
41+
compatible = "samsung,i2s-v5";
42+
reg = <0x03830000 0x100>;
43+
dmas = <&pdma0 10
44+
&pdma0 9
45+
&pdma0 8>;
46+
dma-names = "tx", "rx", "tx-sec";
47+
samsung,supports-6ch;
48+
samsung,supports-rstclr;
49+
samsung,supports-secdai;
50+
samsung,idma-addr = <0x03000000>;
51+
};
52+
53+
- Board Specific Portion:
54+
55+
i2s@03830000 {
56+
gpios = <&gpz 0 2 0 0>, /* I2S_0_SCLK */
57+
<&gpz 1 2 0 0>, /* I2S_0_CDCLK */
58+
<&gpz 2 2 0 0>, /* I2S_0_LRCK */
59+
<&gpz 3 2 0 0>, /* I2S_0_SDI */
60+
<&gpz 4 2 0 0>, /* I2S_0_SDO[1] */
61+
<&gpz 5 2 0 0>, /* I2S_0_SDO[2] */
62+
<&gpz 6 2 0 0>; /* I2S_0_SDO[3] */
63+
};

0 commit comments

Comments
 (0)