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

Commit 460dc1ee authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents 024e4ec1 b531f81b
Loading
Loading
Loading
Loading
+29 −29
Original line number Diff line number Diff line
@@ -871,9 +871,8 @@
      <para>
      This function itself doesn't allocate the data space. The data
      must be allocated manually beforehand, and its pointer is passed
      as the argument. This pointer is used as the
      (<parameter>chip</parameter> identifier in the above example)
      for the instance. 
      as the argument. This pointer (<parameter>chip</parameter> in the
      above example) is used as the identifier for the instance.
      </para>

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

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

          snd_mask_any(&fmt);    /* Init the struct */
          if (c->min < 2) {
                  fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
                  return snd_mask_refine(f, &fmt);
          snd_interval_any(&ch);
          if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
                  ch.min = ch.max = 1;
                  ch.integer = 1;
                  return snd_interval_refine(c, &ch);
          }
          return 0;
  }
@@ -3278,35 +3278,35 @@ struct _snd_pcm_runtime {
	 <programlisting>
<![CDATA[
  snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
                      hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT,
                      -1);
                      hw_rule_channels_by_format, NULL,
                      SNDRV_PCM_HW_PARAM_FORMAT, -1);
]]>
          </programlisting>
        </informalexample>
      </para>

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

       <example>
	 <title>Example of Hardware Constraints for Channels</title>
	 <title>Example of Hardware Constraints for Formats</title>
	 <programlisting>
<![CDATA[
  static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
  static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
                                        struct snd_pcm_hw_rule *rule)
  {
          struct snd_interval *c = hw_param_interval(params,
                SNDRV_PCM_HW_PARAM_CHANNELS);
          struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
          struct snd_interval ch;
          struct snd_mask fmt;

          snd_interval_any(&ch);
          if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
                  ch.min = ch.max = 1;
                  ch.integer = 1;
                  return snd_interval_refine(c, &ch);
          snd_mask_any(&fmt);    /* Init the struct */
          if (c->min < 2) {
                  fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
                  return snd_mask_refine(f, &fmt);
          }
          return 0;
  }
@@ -3321,8 +3321,8 @@ struct _snd_pcm_runtime {
	 <programlisting>
<![CDATA[
  snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
                      hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
                      -1);
                      hw_rule_format_by_channels, NULL,
                      SNDRV_PCM_HW_PARAM_CHANNELS, -1);
]]>
          </programlisting>
        </informalexample>
+17 −0
Original line number Diff line number Diff line
AK4642 I2C transmitter

This device supports I2C mode only.

Required properties:

  - compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648"
  - reg : The chip select number on the I2C bus

Example:

&i2c {
	ak4648: ak4648@0x12 {
		compatible = "asahi-kasei,ak4642";
		reg = <0x12>;
	};
};
+12 −0
Original line number Diff line number Diff line
@@ -20,6 +20,18 @@ Optional properties:
		!RESET pin
 - cirrus,amuteb-eq-bmutec:	When given, the Codec's AMUTEB=BMUTEC flag
				is enabled.
 - cirrus,enable-soft-reset:
	The CS4271 requires its LRCLK and MCLK to be stable before its RESET
	line is de-asserted. That also means that clocks cannot be changed
	without putting the chip back into hardware reset, which also requires
	a complete re-initialization of all registers.

	One (undocumented) workaround is to assert and de-assert the PDN bit
	in the MODE2 register. This workaround can be enabled with this DT
	property.

	Note that this is not needed in case the clocks are stable
	throughout the entire runtime of the codec.

Examples:

+51 −0
Original line number Diff line number Diff line
NVIDIA Tegra audio complex

Required properties:
- compatible : "nvidia,tegra-audio-wm9712"
- nvidia,model : The user-visible name of this sound complex.
- nvidia,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 WM9712's pins, and the jacks on the board:

  WM9712 pins:

  * MONOOUT
  * HPOUTL
  * HPOUTR
  * LOUT2
  * ROUT2
  * OUT3
  * LINEINL
  * LINEINR
  * PHONE
  * PCBEEP
  * MIC1
  * MIC2
  * Mic Bias

  Board connectors:

  * Headphone
  * LineIn
  * Mic

- nvidia,ac97-controller : The phandle of the Tegra AC97 controller


Example:

sound {
	compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
		         "nvidia,tegra-audio-wm9712";
	nvidia,model = "Toradex Colibri T20";

	nvidia,audio-routing =
		"Headphone", "HPOUTL",
		"Headphone", "HPOUTR",
		"LineIn", "LINEINL",
		"LineIn", "LINEINR",
		"Mic", "MIC1";

	nvidia,ac97-controller = <&ac97>;
};
+22 −0
Original line number Diff line number Diff line
NVIDIA Tegra 20 AC97 controller

Required properties:
- compatible : "nvidia,tegra20-ac97"
- reg : Should contain AC97 controller registers location and length
- interrupts : Should contain AC97 interrupt
- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
  request selector for the AC97 controller
- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number
  of the GPIO used to reset the external AC97 codec
- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number
  of the GPIO corresponding with the AC97 DAP _FS line
Example:

ac97@70002000 {
	compatible = "nvidia,tegra20-ac97";
	reg = <0x70002000 0x200>;
	interrupts = <0 81 0x04>;
	nvidia,dma-request-selector = <&apbdma 12>;
	nvidia,codec-reset-gpio = <&gpio 170 0>;
	nvidia,codec-sync-gpio = <&gpio 120 0>;
};
Loading