Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7092914 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound updates from Takashi Iwai:
 "There have been lots of changes in ALSA core, HD-audio and ASoC, also
  most of PCI drivers touched by conversions of printks.  All these
  resulted in a high volume and wide ranged patch sets in this release.
  Many changes are fairly trivial, but also lots of nice cleanups and
  refactors.  There are a few new drivers, most notably, the Intel
  Haswell and Baytrail ASoC driver.

  Core changes:
   - A bit modernization; embed the device struct into snd_card struct,
     so that it may be referred from the beginning.  A new
     snd_card_new() function is introduced for that, and all drivers
     have been converted.

   - Simplification in the device management code in ALSA core; now
     managed by a simple priority list instead

   - Converted many kernel messages to use the standard dev_err() & co;
     this would be the pretty visible difference, especially for
     HD-audio.

  HD-audio:
   - Conexant codecs use the auto-parser as default now; the old static
     code still remains in case of regressions.  Some old quirks have
     been rewritten with the fixups for auto-parser.

   - C-Media codecs also use the auto-parser as default now, too.

   - A device struct is assigned to each HD-audio codec, and the
     formerly hwdep attributes are accessible over the codec sysfs, too.
     hwdep attributes still remain for compatibility.

   - Split the PCI-specific stuff for HD-audio controller into a
     separate module, ane make a helper module for the generic
     controller driver.  This is a preliminary change for supporting
     Tegra HDMI controller in near future, which slipped from 3.15
     merge.

   - Device-specific fixes: mute LED support for Lenovo Ideapad, mic LED
     fix for HP laptops, more ASUS subwoofer quirks, yet more Dell
     laptop headset quirks

   - Make the HD-audio codec response a bit more robust

   - A few improvements on Realtek ALC282 / 283 about the pop noises

   - A couple of Intel HDMI fixes

  ASoC:
   - Lots of cleanups for enumerations; refactored lots of error prone
     original codes to use more modern APIs

   - Elimination of the ASoC level wrappers for I2C and SPI moving us
     closer to converting to regmap completely and avoiding some
     randconfig hassle

   - Provide both manually and transparently locked DAPM APIs rather
     than a mix of the two fixing some concurrency issues

   - Start converting CODEC drivers to use separate bus interface
     drivers rather than having them all in one file helping avoid
     dependency issues

   - DPCM support for Intel Haswell and Bay Trail platforms, lots of
     fixes

   - Lots of work on improvements for simple-card, DaVinci and the
     Renesas rcar drivers.

   - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of
     the CSR SiRF SoC, TLV320AIC31XXX, Armada 370 DB, Cirrus cs42xx8

   - Fixes for the simple-card DAI format DT mess

   - DT support for a couple more devices.

   - Use of the tdm_slot mapping in a few drivers

  Others:
   - Support of reset_resume callback for improved S4 in USB-audio
     driver; the device with boot quirks have been little tested, which
     we need to watch out in this development cycle

   - Add PM support for ICE1712 driver (finally!); it's still pretty
     partial support, only for M-Audio devices"

* tag 'sound-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (610 commits)
  ALSA: ice1712: Add suspend support for M-Audio ICE1712-based cards
  ALSA: ice1712: add suspend support for ICE1712 chip
  ALSA: hda - Enable beep for ASUS 1015E
  ALSA: asihpi: fix some indenting in snd_card_asihpi_pcm_new()
  ALSA: hda - add headset mic detect quirks for three Dell laptops
  ASoC: tegra: move AC97 clock handling to the machine driver
  ASoC: simple-card: Handle many DAI links
  ASoC: simple-card: Add DT documentation for multi-DAI links
  ASoC: simple-card: dynamically allocate the DAI link and properties
  ASoC: imx-ssi: Add .xlate_tdm_slot_mask() support.
  ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support.
  ASoC: fsl-utils: Add fsl_asoc_xlate_tdm_slot_mask() support.
  ASoC: core: remove the 'of_' prefix of of_xlate_tdm_slot_mask.
  ASoC: rcar: subnode tidyup for renesas,rsnd.txt
  ASoC: Remove name_prefix unset during DAI link init hack
  ALSA: hda - Inform the unexpectedly ignored pins by auto-parser
  ASoC: rcar: bugfix: it cares about the non-src case
  ARM: bockw: fixup SND_SOC_DAIFMT_CBx_CFx flags
  ASoC: pcm: Drop incorrect double/extra frees
  ASoC: mfld_machine: Fix compile error
  ...
parents 4b1779c2 69dd89fd
Loading
Loading
Loading
Loading
+27 −45
Original line number Diff line number Diff line
@@ -468,8 +468,6 @@
                  return err;
          }

          snd_card_set_dev(card, &pci->dev);

          *rchip = chip;
          return 0;
  }
@@ -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;

@@ -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>
@@ -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>

@@ -916,15 +922,15 @@
      </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,
  err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
                     sizeof(struct mychip), &card);
]]>
            </programlisting>
@@ -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>. 

@@ -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);
]]>
@@ -1170,8 +1177,6 @@
                  return err;
          }

          snd_card_set_dev(card, &pci->dev);

          *rchip = chip;
          return 0;
  }        
@@ -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>
@@ -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);
          ....
@@ -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>
@@ -5766,7 +5748,7 @@ struct _snd_pcm_runtime {
          struct mychip *chip;
          int err;
          ....
          err = snd_card_create(index[dev], id[dev], THIS_MODULE,
          err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
                             sizeof(struct mychip), &card);
          ....
          chip = card->private_data;
+1 −0
Original line number Diff line number Diff line
@@ -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
+8 −0
Original line number Diff line number Diff line
@@ -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 {
+27 −0
Original line number Diff line number Diff line
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 −0
Original line number Diff line number Diff line
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>;
};
Loading