Skip to content

Commit

Permalink
Merge tag 'sound-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This time it's a relatively calm update batch, but the amount isn't
  too small in the end.  Here we go over some highlights:

  ALSA core:
   - One major change is the support of nonatomic PCM operations.  This
     allows the trigger and other callbacks to call schedule(), which
     would be useful for mailbox type communications.  Already some
     drivers (Digigram ones) have been converted to use together with
     threaded irqs as an example.
   - Improvement / fixes of DSD PCM format support

  HD-audio:
   - Large volume of rewrites are found in Realtek codec driver for
     converting Dell and HP quirks to generic forms.
   - Inverted dmic code cleanup from David.
   - Realtek COEF access has been optimized.
   - Now HD-audio jack infrastructure allows multiple callbacks, which
     fixes / simplifies the jack-dependent power controls on STAC/IDT
     and VIA codecs.
   - Many additional device-specific fixups as usual
   - A few deadcode cleanups, CA0132 code cleanup, etc.

  ASoC:
   - More componentization work from Lars-Peter, this time mainly
     cleaning up the suspend and bias level transition callbacks.
   - Real system support for the Intel drivers and a bunch of fixes and
     enhancements for the associated CODEC drivers, this is going to
     need a lot quirks over time due to the lack of any firmware
     description of the boards.
   - Jack detect support for simple card from Dylan Reid.
   - A bunch of small fixes and enhancements for the Freescale drivers.
   - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32,
     Everest Semiconductor ES8328 and Freescale cards using the ASRC in
     newer i.MX processors.
   - A few simple-card fixes, mostly cleanups but also a fix for
     interaction between GPIO 0 and simple-card.

  Misc:
   - Virtuoso / Oxygen updates by Clemens
   - USB-audio: Yamaha MOTIF XF MIDI port name fixes
   - Conversion of kernel messages to standard dev_*() in ctxfi driver"

* tag 'sound-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (251 commits)
  ASoC: mc13783: Ensure we only try to dereference valid of_nodes
  ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl
  ALSA: hda - Add dock port support to Thinkpad L440 (71aa:501e)
  ALSA: Allow pass NULL dev for snd_pci_quirk_lookup()
  ASoC: imx-es8328: Fix of_node_put() call with uninitialized object
  ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb()
  ASoC: simple-card: Initialize headphone and mic GPIO numbers
  ASoC: imx-es8328: Fix missing return code in imx_es8328_probe()
  ALSA: hda - Add dock support for Thinkpad T440 (17aa:2212)
  ALSA: usb: caiaq: check for cdev->n_streams > 1
  ASoC: 88pm860x-codec: Fix possibly missing string termination
  ASoC: core: fix use after free in snd_soc_remove_platform()
  ASoC: soc-dapm: fix use after free
  ALSA: hda - Make the inv dmic handling for Realtek use generic parser
  ALSA: hda - Add Inverted Internal mic for Samsung Ativ book 9 (NP900X3G)
  ALSA: hda - Add inverted internal mic for Asus Aspire 4830T
  ASoC: Intel: byt-rt5640: fix coccinelle warnings
  ASoC: fsl_esai doc: Add "fsl,vf610-esai" as compatible string
  ASoC: da732x: Remove unnecessary KERN_ERR in pr_err()
  ASoC: simple-card: Fix detect gpio documentation.
  ...
  • Loading branch information
torvalds committed Oct 11, 2014
2 parents bf65dea + fd1a2a9 commit a2ce352
Show file tree
Hide file tree
Showing 195 changed files with 8,018 additions and 3,263 deletions.
28 changes: 23 additions & 5 deletions Documentation/DocBook/writing-an-alsa-driver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2742,7 +2742,9 @@ struct _snd_pcm_runtime {

<para>
Another note is that this callback is non-atomic
(schedulable). This is important, because the
(schedulable) as default, i.e. when no
<structfield>nonatomic</structfield> flag set.
This is important, because the
<structfield>trigger</structfield> callback
is atomic (non-schedulable). That is, mutexes or any
schedule-related functions are not available in
Expand Down Expand Up @@ -2900,8 +2902,9 @@ struct _snd_pcm_runtime {
</para>

<para>
As mentioned, this callback is atomic. You cannot call
functions which may sleep.
As mentioned, this callback is atomic as default unless
<structfield>nonatomic</structfield> flag set, and
you cannot call functions which may sleep.
The trigger callback should be as minimal as possible,
just really triggering the DMA. The other stuff should be
initialized hw_params and prepare callbacks properly
Expand Down Expand Up @@ -2936,7 +2939,7 @@ struct _snd_pcm_runtime {
</para>

<para>
This callback is also atomic.
This callback is also atomic as default.
</para>
</section>

Expand Down Expand Up @@ -2972,7 +2975,7 @@ struct _snd_pcm_runtime {
is useful only for such a purpose.
</para>
<para>
This callback is atomic.
This callback is atomic as default.
</para>
</section>

Expand Down Expand Up @@ -3175,6 +3178,21 @@ struct _snd_pcm_runtime {
called with local interrupts disabled.
</para>

<para>
The recent changes in PCM core code, however, allow all PCM
operations to be non-atomic. This assumes that the all caller
sides are in non-atomic contexts. For example, the function
<function>snd_pcm_period_elapsed()</function> is called
typically from the interrupt handler. But, if you set up the
driver to use a threaded interrupt handler, this call can be in
non-atomic context, too. In such a case, you can set
<structfield>nonatomic</structfield> filed of
<structname>snd_pcm</structname> object after creating it.
When this flag is set, mutex and rwsem are used internally in
the PCM core instead of spin and rwlocks, so that you can call
all PCM functions safely in a non-atomic context.
</para>

</section>
<section id="pcm-interface-constraints">
<title>Constraints</title>
Expand Down
19 changes: 19 additions & 0 deletions Documentation/devicetree/bindings/sound/adi,ssm2602.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices

SSM2602 support both I2C and SPI as the configuration interface,
the selection is made by the MODE strap-in pin.
SSM2603 and SSM2604 only support I2C as the configuration interface.

Required properties:

- compatible : One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"

- reg : the I2C address of the device for I2C, the chip select
number for SPI.

Example:

ssm2602: ssm2602@1a {
compatible = "adi,ssm2602";
reg = <0x1a>;
};
62 changes: 62 additions & 0 deletions Documentation/devicetree/bindings/sound/cs35l32.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
CS35L32 audio CODEC

Required properties:

- compatible : "cirrus,cs35l32"

- reg : the I2C address of the device for I2C. Address is determined by the level
of the AD0 pin. Level 0 is 0x40 while Level 1 is 0x41.

- VA-supply, VP-supply : power supplies for the device,
as covered in Documentation/devicetree/bindings/regulator/regulator.txt.

Optional properties:

- reset-gpios : a GPIO spec for the reset pin. If specified, it will be
deasserted before communication to the codec starts.

- cirrus,boost-manager : Boost voltage control.
0 = Automatically managed. Boost-converter output voltage is the higher
of the two: Class G or adaptive LED voltage.
1 = Automatically managed irrespective of audio, adapting for low-power
dissipation when LEDs are ON, and operating in Fixed-Boost Bypass Mode
if LEDs are OFF (VBST = VP).
2 = (Default) Boost voltage fixed in Bypass Mode (VBST = VP).
3 = Boost voltage fixed at 5 V.

- cirrus,sdout-datacfg : Data configuration for dual CS35L32 applications only.
Determines the data packed in a two-CS35L32 configuration.
0 = Left/right channels VMON[11:0], IMON[11:0], VPMON[7:0].
1 = Left/right channels VMON[11:0], IMON[11:0], STATUS.
2 = (Default) left/right channels VMON[15:0], IMON [15:0].
3 = Left/right channels VPMON[7:0], STATUS.

- cirrus,sdout-share : SDOUT sharing. Determines whether one or two CS35L32
devices are on board sharing SDOUT.
0 = (Default) One IC.
1 = Two IC's.

- cirrus,battery-recovery : Low battery nominal recovery threshold, rising VP.
0 = 3.1V
1 = 3.2V
2 = 3.3V (Default)
3 = 3.4V

- cirrus,battery-threshold : Low battery nominal threshold, falling VP.
0 = 3.1V
1 = 3.2V
2 = 3.3V
3 = 3.4V (Default)
4 = 3.5V
5 = 3.6V

Example:

codec: codec@40 {
compatible = "cirrus,cs35l32";
reg = <0x40>;
reset-gpios = <&gpio 10 0>;
cirrus,boost-manager = <0x03>;
cirrus,sdout-datacfg = <0x02>;
VA-supply = <&reg_audio>;
};
38 changes: 38 additions & 0 deletions Documentation/devicetree/bindings/sound/es8328.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Everest ES8328 audio CODEC

This device supports both I2C and SPI.

Required properties:

- compatible : "everest,es8328"
- 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
- IPVDD-supply : Regulator providing analog output voltage 3.3V
- clocks : A 22.5792 or 11.2896 MHz clock
- reg : the I2C address of the device for I2C, the chip select number for SPI

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

* LOUT1
* LOUT2
* ROUT1
* ROUT2
* LINPUT1
* RINPUT1
* LINPUT2
* RINPUT2
* Mic Bias


Example:

codec: es8328@11 {
compatible = "everest,es8328";
DVDD-supply = <&reg_3p3v>;
AVDD-supply = <&reg_3p3v>;
PVDD-supply = <&reg_3p3v>;
HPVDD-supply = <&reg_3p3v>;
clocks = <&clks 169>;
reg = <0x11>;
};
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/sound/fsl,esai.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ other DSPs. It has up to six transmitters and four receivers.

Required properties:

- compatible : Compatible list, must contain "fsl,imx35-esai".
- compatible : Compatible list, must contain "fsl,imx35-esai" or
"fsl,vf610-esai"

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

Expand Down
8 changes: 1 addition & 7 deletions Documentation/devicetree/bindings/sound/fsl,ssi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ Optional properties:
Documentation/devicetree/bindings/dma/dma.txt.
- dma-names: Two dmas have to be defined, "tx" and "rx", if fsl,imx-fiq
is not defined.
- fsl,mode: The operating mode for the SSI interface.
"i2s-slave" - I2S mode, SSI is clock slave
"i2s-master" - I2S mode, SSI is clock master
"lj-slave" - left-justified mode, SSI is clock slave
"lj-master" - l.j. mode, SSI is clock master
"rj-slave" - right-justified mode, SSI is clock slave
"rj-master" - r.j., SSI is clock master
- fsl,mode: The operating mode for the AC97 interface only.
"ac97-slave" - AC97 mode, SSI is clock slave
"ac97-master" - AC97 mode, SSI is clock master

Expand Down
82 changes: 82 additions & 0 deletions Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Freescale Generic ASoC Sound Card with ASRC support

The Freescale Generic ASoC Sound Card can be used, ideally, for all Freescale
SoCs connecting with external CODECs.

The idea of this generic sound card is a bit like ASoC Simple Card. However,
for Freescale SoCs (especially those released in recent years), most of them
have ASRC (Documentation/devicetree/bindings/sound/fsl,asrc.txt) inside. And
this is a specific feature that might be painstakingly controlled and merged
into the Simple Card.

So having this generic sound card allows all Freescale SoC users to benefit
from the simplification of a new card support and the capability of the wide
sample rates support through ASRC.

Note: The card is initially designed for those sound cards who use I2S and
PCM DAI formats. However, it'll be also possible to support those non
I2S/PCM type sound cards, such as S/PDIF audio and HDMI audio, as long
as the driver has been properly upgraded.


The compatible list for this generic sound card currently:
"fsl,imx-audio-cs42888"

"fsl,imx-audio-wm8962"
(compatible with Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt)

"fsl,imx-audio-sgtl5000"
(compatible with Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt)

Required properties:

- compatible : Contains one of entries in the compatible list.

- model : The user-visible name of this sound complex

- audio-cpu : The phandle of an CPU DAI controller

- audio-codec : The phandle of an audio codec

- audio-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. There're a few pre-designed board connectors:
* Line Out Jack
* Line In Jack
* Headphone Jack
* Mic Jack
* Ext Spk
* AMIC (stands for Analog Microphone Jack)
* DMIC (stands for Digital Microphone Jack)

Note: The "Mic Jack" and "AMIC" are redundant while
coexsiting in order to support the old bindings
of wm8962 and sgtl5000.

Optional properties:

- audio-asrc : The phandle of ASRC. It can be absent if there's no
need to add ASRC support via DPCM.

Example:
sound-cs42888 {
compatible = "fsl,imx-audio-cs42888";
model = "cs42888-audio";
audio-cpu = <&esai>;
audio-asrc = <&asrc>;
audio-codec = <&cs42888>;
audio-routing =
"Line Out Jack", "AOUT1L",
"Line Out Jack", "AOUT1R",
"Line Out Jack", "AOUT2L",
"Line Out Jack", "AOUT2R",
"Line Out Jack", "AOUT3L",
"Line Out Jack", "AOUT3R",
"Line Out Jack", "AOUT4L",
"Line Out Jack", "AOUT4R",
"AIN1L", "Line In Jack",
"AIN1R", "Line In Jack",
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
};
30 changes: 22 additions & 8 deletions Documentation/devicetree/bindings/sound/fsl-sai.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,26 @@ Required properties:
- pinctrl-names: Must contain a "default" entry.
- pinctrl-NNN: One property must exist for each entry in pinctrl-names.
See ../pinctrl/pinctrl-bindings.txt for details of the property values.
- big-endian-regs: If this property is absent, the little endian mode will
be in use as default, or the big endian mode will be in use for all the
device registers.
- big-endian-data: If this property is absent, the little endian mode will
be in use as default, or the big endian mode will be in use for all the
fifo data.
- big-endian: Boolean property, required if all the FTM_PWM registers
are big-endian rather than little-endian.
- lsb-first: Configures whether the LSB or the MSB is transmitted first for
the fifo data. If this property is absent, the MSB is transmitted first as
default, or the LSB is transmitted first.
- fsl,sai-synchronous-rx: This is a boolean property. If present, indicating
that SAI will work in the synchronous mode (sync Tx with Rx) which means
both the transimitter and receiver will send and receive data by following
receiver's bit clocks and frame sync clocks.
- fsl,sai-asynchronous: This is a boolean property. If present, indicating
that SAI will work in the asynchronous mode, which means both transimitter
and receiver will send and receive data by following their own bit clocks
and frame sync clocks separately.

Note:
- If both fsl,sai-asynchronous and fsl,sai-synchronous-rx are absent, the
default synchronous mode (sync Rx with Tx) will be used, which means both
transimitter and receiver will send and receive data by following clocks
of transimitter.
- fsl,sai-asynchronous and fsl,sai-synchronous-rx are exclusive.

Example:
sai2: sai@40031000 {
Expand All @@ -38,6 +52,6 @@ sai2: sai@40031000 {
dma-names = "tx", "rx";
dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
<&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
big-endian-regs;
big-endian-data;
big-endian;
lsb-first;
};
60 changes: 60 additions & 0 deletions Documentation/devicetree/bindings/sound/imx-audio-es8328.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Freescale i.MX audio complex with ES8328 codec

Required properties:
- compatible : "fsl,imx-audio-es8328"
- model : The user-visible name of this sound complex
- ssi-controller : The phandle of the i.MX SSI controller
- jack-gpio : Optional GPIO for headphone jack
- audio-amp-supply : Power regulator for speaker amps
- audio-codec : The phandle of the ES8328 audio codec
- audio-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. Valid names could be power supplies, ES8328
pins, and the jacks on the board:

Power supplies:
* audio-amp

ES8328 pins:
* LOUT1
* LOUT2
* ROUT1
* ROUT2
* LINPUT1
* LINPUT2
* RINPUT1
* RINPUT2
* Mic PGA

Board connectors:
* Headphone
* Speaker
* Mic Jack
- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
- mux-ext-port : The external port of the i.MX audio muxer (AUDMIX)

Note: The AUDMUX port numbering should start at 1, which is consistent with
hardware manual.

Example:

sound {
compatible = "fsl,imx-audio-es8328";
model = "imx-audio-es8328";
ssi-controller = <&ssi1>;
audio-codec = <&codec>;
jack-gpio = <&gpio5 15 0>;
audio-amp-supply = <&reg_audio_amp>;
audio-routing =
"Speaker", "LOUT2",
"Speaker", "ROUT2",
"Speaker", "audio-amp",
"Headphone", "ROUT1",
"Headphone", "LOUT1",
"LINPUT1", "Mic Jack",
"RINPUT1", "Mic Jack",
"Mic Jack", "Mic Bias";
mux-int-port = <1>;
mux-ext-port = <3>;
};
Loading

0 comments on commit a2ce352

Please sign in to comment.