Skip to content

Commit

Permalink
Merge branch 'for-next' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Iwai committed Mar 31, 2014
2 parents 749d322 + a4b7f21 commit 9ddd84f
Show file tree
Hide file tree
Showing 714 changed files with 30,656 additions and 14,310 deletions.
72 changes: 27 additions & 45 deletions Documentation/DocBook/writing-an-alsa-driver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,6 @@
return err;
}
snd_card_set_dev(card, &pci->dev);
*rchip = chip;
return 0;
}
Expand All @@ -492,7 +490,8 @@
}
/* (2) */
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
0, &card);
if (err < 0)
return err;
Expand Down Expand Up @@ -591,7 +590,8 @@
struct snd_card *card;
int err;
....
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
0, &card);
]]>
</programlisting>
</informalexample>
Expand Down Expand Up @@ -809,28 +809,34 @@

<para>
As mentioned above, to create a card instance, call
<function>snd_card_create()</function>.
<function>snd_card_new()</function>.

<informalexample>
<programlisting>
<![CDATA[
struct snd_card *card;
int err;
err = snd_card_create(index, id, module, extra_size, &card);
err = snd_card_new(&pci->dev, index, id, module, extra_size, &card);
]]>
</programlisting>
</informalexample>
</para>

<para>
The function takes five arguments, the card-index number, the
id string, the module pointer (usually
The function takes six arguments: the parent device pointer,
the card-index number, the id string, the module pointer (usually
<constant>THIS_MODULE</constant>),
the size of extra-data space, and the pointer to return the
card instance. The extra_size argument is used to
allocate card-&gt;private_data for the
chip-specific data. Note that these data
are allocated by <function>snd_card_create()</function>.
are allocated by <function>snd_card_new()</function>.
</para>

<para>
The first argument, the pointer of struct
<structname>device</structname>, specifies the parent device.
For PCI devices, typically &amp;pci-&gt; is passed there.
</para>
</section>

Expand Down Expand Up @@ -916,16 +922,16 @@
</para>

<section id="card-management-chip-specific-snd-card-new">
<title>1. Allocating via <function>snd_card_create()</function>.</title>
<title>1. Allocating via <function>snd_card_new()</function>.</title>
<para>
As mentioned above, you can pass the extra-data-length
to the 4th argument of <function>snd_card_create()</function>, i.e.
to the 5th argument of <function>snd_card_new()</function>, i.e.

<informalexample>
<programlisting>
<![CDATA[
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct mychip), &card);
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
sizeof(struct mychip), &card);
]]>
</programlisting>
</informalexample>
Expand Down Expand Up @@ -954,7 +960,7 @@

<para>
After allocating a card instance via
<function>snd_card_create()</function> (with
<function>snd_card_new()</function> (with
<constant>0</constant> on the 4th arg), call
<function>kzalloc()</function>.

Expand All @@ -963,7 +969,8 @@
<![CDATA[
struct snd_card *card;
struct mychip *chip;
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
0, &card);
.....
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
]]>
Expand Down Expand Up @@ -1170,8 +1177,6 @@
return err;
}
snd_card_set_dev(card, &pci->dev);
*rchip = chip;
return 0;
}
Expand Down Expand Up @@ -1526,30 +1531,6 @@

</section>

<section id="pci-resource-device-struct">
<title>Registration of Device Struct</title>
<para>
At some point, typically after calling <function>snd_device_new()</function>,
you need to register the struct <structname>device</structname> of the chip
you're handling for udev and co. ALSA provides a macro for compatibility with
older kernels. Simply call like the following:
<informalexample>
<programlisting>
<![CDATA[
snd_card_set_dev(card, &pci->dev);
]]>
</programlisting>
</informalexample>
so that it stores the PCI's device pointer to the card. This will be
referred by ALSA core functions later when the devices are registered.
</para>
<para>
In the case of non-PCI, pass the proper device struct pointer of the BUS
instead. (In the case of legacy ISA without PnP, you don't have to do
anything.)
</para>
</section>

<section id="pci-resource-entries">
<title>PCI Entries</title>
<para>
Expand Down Expand Up @@ -5740,7 +5721,8 @@ struct _snd_pcm_runtime {
struct mychip *chip;
int err;
....
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
0, &card);
....
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
....
Expand All @@ -5752,7 +5734,7 @@ struct _snd_pcm_runtime {
</informalexample>

When you created the chip data with
<function>snd_card_create()</function>, it's anyway accessible
<function>snd_card_new()</function>, it's anyway accessible
via <structfield>private_data</structfield> field.

<informalexample>
Expand All @@ -5766,8 +5748,8 @@ struct _snd_pcm_runtime {
struct mychip *chip;
int err;
....
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct mychip), &card);
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
sizeof(struct mychip), &card);
....
chip = card->private_data;
....
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/i2c/trivial-devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ atmel,24c02 i2c serial eeprom (24cxx)
atmel,at97sc3204t i2c trusted platform module (TPM)
capella,cm32181 CM32181: Ambient Light Sensor
catalyst,24c32 i2c serial eeprom
cirrus,cs42l51 Cirrus Logic CS42L51 audio codec
dallas,ds1307 64 x 8, Serial, I2C Real-Time Clock
dallas,ds1338 I2C RTC with 56-Byte NV RAM
dallas,ds1339 I2C Serial Real-Time Clock
Expand Down
8 changes: 8 additions & 0 deletions Documentation/devicetree/bindings/misc/atmel-ssc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Required properties for devices compatible with "atmel,at91sam9g45-ssc":
See Documentation/devicetree/bindings/dma/atmel-dma.txt for details.
- dma-names: Must be "tx", "rx".

Optional properties:
- atmel,clk-from-rk-pin: bool property.
- When SSC works in slave mode, according to the hardware design, the
clock can get from TK pin, and also can get from RK pin. So, add
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.

Examples:
- PDC transfer:
ssc0: ssc@fffbc000 {
Expand Down
27 changes: 27 additions & 0 deletions Documentation/devicetree/bindings/sound/armada-370db-audio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Device Tree bindings for the Armada 370 DB audio
================================================

These Device Tree bindings are used to describe the audio complex
found on the Armada 370 DB platform.

Mandatory properties:

* compatible: must be "marvell,a370db-audio"

* marvell,audio-controller: a phandle that points to the audio
controller of the Armada 370 SoC.

* marvell,audio-codec: a set of three phandles that points to:

1/ the analog audio codec connected to the Armada 370 SoC
2/ the S/PDIF transceiver
3/ the S/PDIF receiver

Example:

sound {
compatible = "marvell,a370db-audio";
marvell,audio-controller = <&audio_controller>;
marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>;
status = "okay";
};
28 changes: 28 additions & 0 deletions Documentation/devicetree/bindings/sound/cs42xx8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CS42448/CS42888 audio CODEC

Required properties:

- compatible : must contain one of "cirrus,cs42448" and "cirrus,cs42888"

- reg : the I2C address of the device for I2C

- clocks : a list of phandles + clock-specifiers, one for each entry in
clock-names

- clock-names : must contain "mclk"

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

Example:

codec: cs42888@48 {
compatible = "cirrus,cs42888";
reg = <0x48>;
clocks = <&codec_mclk 0>;
clock-names = "mclk";
VA-supply = <&reg_audio>;
VD-supply = <&reg_audio>;
VLS-supply = <&reg_audio>;
VLC-supply = <&reg_audio>;
};
22 changes: 22 additions & 0 deletions Documentation/devicetree/bindings/sound/da9055.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
* Dialog DA9055 Audio CODEC

DA9055 provides Audio CODEC support (I2C only).

The Audio CODEC device in DA9055 has it's own I2C address which is configurable,
so the device is instantiated separately from the PMIC (MFD) device.

For details on accompanying PMIC I2C device, see the following:
Documentation/devicetree/bindings/mfd/da9055.txt

Required properties:

- compatible: "dlg,da9055-codec"
- reg: Specifies the I2C slave address


Example:

codec: da9055-codec@1a {
compatible = "dlg,da9055-codec";
reg = <0x1a>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ Required properties:
- ti,model : The user-visible name of this sound complex.
- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
- ti,mcasp-controller : The phandle of the McASP controller
- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
- ti,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 for sources and
sinks are the codec's pins, and the jacks on the board:

Optional properties:
- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec.
- clocks : Reference to the master clock
- clock-names : The clock should be named "mclk"
- Either codec-clock-rate or the codec-clock reference has to be defined. If
the both are defined the driver attempts to set referenced clock to the
defined rate and takes the rate from the clock reference.

Board connectors:

* Headphone Jack
Expand Down
21 changes: 21 additions & 0 deletions Documentation/devicetree/bindings/sound/eukrea-tlv320.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Audio complex for Eukrea boards with tlv320aic23 codec.

Required properties:
- compatible : "eukrea,asoc-tlv320"
- eukrea,model : The user-visible name of this sound complex.
- ssi-controller : The phandle of the SSI controller.
- fsl,mux-int-port : The internal port of the i.MX audio muxer (AUDMUX).
- fsl,mux-ext-port : The external port of the i.MX audio muxer.

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

Example:

sound {
compatible = "eukrea,asoc-tlv320";
eukrea,model = "imx51-eukrea-tlv320aic23";
ssi-controller = <&ssi2>;
fsl,mux-int-port = <2>;
fsl,mux-ext-port = <3>;
};
5 changes: 5 additions & 0 deletions Documentation/devicetree/bindings/sound/fsl,esai.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Required properties:
that ESAI would work in the synchronous mode, which means all the settings
for Receiving would be duplicated from Transmition related registers.

- big-endian : If this property is absent, the native endian mode will
be in use as default, or the big endian mode will be in use for all the
device registers.

Example:

esai: esai@02024000 {
Expand All @@ -46,5 +50,6 @@ esai: esai@02024000 {
dma-names = "rx", "tx";
fsl,fifo-depth = <128>;
fsl,esai-synchronous;
big-endian;
status = "disabled";
};
5 changes: 5 additions & 0 deletions Documentation/devicetree/bindings/sound/fsl,spdif.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Required properties:
can also be referred to TxClk_Source
bit of register SPDIF_STC.

- big-endian : If this property is absent, the native endian mode will
be in use as default, or the big endian mode will be in use for all the
device registers.

Example:

spdif: spdif@02004000 {
Expand All @@ -50,5 +54,6 @@ spdif: spdif@02004000 {
"rxtx5", "rxtx6",
"rxtx7";

big-endian;
status = "okay";
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/sound/mvebu-audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Required properties:
- compatible:
"marvell,kirkwood-audio" for Kirkwood platforms
"marvell,dove-audio" for Dove platforms
"marvell,armada370-audio" for Armada 370 platforms

- reg: physical base address of the controller and length of memory mapped
region.
Expand Down
30 changes: 30 additions & 0 deletions Documentation/devicetree/bindings/sound/pcm512x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
PCM512x audio CODECs

These devices support both I2C and SPI (configured with pin strapping
on the board).

Required properties:

- compatible : One of "ti,pcm5121" or "ti,pcm5122"

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

- AVDD-supply, DVDD-supply, and CPVDD-supply : power supplies for the
device, as covered in bindings/regulator/regulator.txt

Optional properties:

- clocks : A clock specifier for the clock connected as SCLK. If this
is absent the device will be configured to clock from BCLK.

Example:

pcm5122: pcm5122@4c {
compatible = "ti,pcm5122";
reg = <0x4c>;

AVDD-supply = <&reg_3v3_analog>;
DVDD-supply = <&reg_1v8>;
CPVDD-supply = <&reg_3v3>;
};
Loading

0 comments on commit 9ddd84f

Please sign in to comment.