22 Dec, 2011

4 commits

  • commit 82e14e8bdd88b69018fe757192b01dd98582905e upstream.

    For cards that have two or more DAIs, snd_soc_resume's loop over all
    DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
    Since this is the same work item each time, the 2nd and subsequent
    calls return 0 (work item already queued), and trigger the dev_err
    message below stating that a work item may have been lost.

    Solve this by adjusting the loop to simply calculate whether to run the
    resume work immediately or defer it, and then call schedule work (or not)
    one time based on that.

    Note: This has not been tested in mainline, but only in chromeos-2.6.38;
    mainline doesn't support suspend/resume on Tegra, nor does the mainline
    Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
    mainline.

    Signed-off-by: Stephen Warren
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Stephen Warren
     
  • commit cefcc03ffc9527dde56807339edb1719c8dbae5f upstream.

    Allow userspace applications to do more parameter setting by providing a
    more complete stub DMA driver specifying a wildcard set of formats and
    channels and essentially random values for the DMA parameters. This is
    required for useful runtime operation of the dummy DMA driver until we
    are able to figure out how to power up links and do hw_params() from DAPM.

    Sending to stable as without this the dummy driver is not terribly
    useful.

    Reported-by: Kyung-Kwee Ryu
    Tested-by: Kyung-Kwee Ryu
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Mark Brown
     
  • commit cce4aa378a049f4275416ee6302dd24f37b289df upstream.

    When no imux is available (e.g. a single capture source),
    alc_auto_init_input_src() may trigger an Oops due to the access to -1.
    Add a proper zero-check to avoid it.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit fc084e0b930d546872ab23667052499f7daf0fed upstream.

    There are some AC97 codec and board combinations that have been observed
    to take a very long time to respond after the cold reset has completed.
    In one case, more than 350 ms was required. To allow users to have sound
    on those platforms, we'll wait up to 500ms for the codec to become
    ready.

    As a board may have multiple codecs, with some faster than others to
    reset, we add a module parameter to inform the driver which codecs
    should be present.

    Reported-by: KotCzarny
    Signed-off-by: David Dillow
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Dillow
     

10 Dec, 2011

4 commits

  • commit ed3e80c4c991a52f9fce3421536a78e331ae0949 upstream.

    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Mark Brown
     
  • commit 2391a0e06789a3f1718dee30b282562f7ed28c87 upstream.

    This patch makes it possible to set DAI mode to its currently applied
    value even if codec is active. This is necessary to allow

    aplay -t raw -r 44100 -f S16_LE -c 2 < /dev/urandom &
    alsactl store -f backup.state
    alsactl restore -f backup.state

    to work without returning errors. This patch is based on a patch sent
    by Klaus Kurzmann .

    Signed-off-by: Timo Juhani Lindfors
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Timo Juhani Lindfors
     
  • commit 0f768a7235d3dfb6f4833030a95a06419df089cb upstream.

    Commit 6992f533 ("sysfs: Use one lockdep class per sysfs attribute")
    requires 'struct attribute' objects to be initialized with sysfs_attr_init().

    Signed-off-by: Timur Tabi
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Timur Tabi
     
  • commit a29878553a9a7b4c06f93c7e383527cf014d4ceb upstream.

    commit 6175ddf06b6172046a329e3abfd9c901a43efd2e optimized the mem*io
    functions that have been used to send commands to the device. these
    optimizations somehow corrupted the communication with the lx6464es,
    that resulted the device to be unusable with kernels after 2.6.33.

    this patch emulates the memcpy_*_io functions via a loop to avoid these
    problems.

    Signed-off-by: Tim Blechmann
    LKML-Reference:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Tim Blechmann
     

22 Nov, 2011

4 commits

  • commit dcaaf9f2c16b56f8bb316881fcd3f15c18fc71e7 upstream.

    In the recent usb-audio driver, the initialization of volume ranges
    may be delayed when the device doesn't respond well at the probing time.
    But the volume quirks for certain devices are applied only in
    mixer_ctl_feature_info() thus only at the very first probe and will be
    missing when the volume range is initialized later.

    This patch moves the volume quirk code to be always called from the
    volume-range extraction (get_min_max()), so that the quirks are properly
    applied in the later init time.

    Reported-and-tested-by: Alexey Fisher
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 9fcd0ab130579d9742538340edda3225f2b49a3e upstream.

    When the initial check of dB-range failed due to the read error, try to
    check again at the later read, too. When an invalid dB range is found,
    remove TLV flags and notify the mixer info change.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 8eeea521d9d0fa6afd62df8c6e6566ee946117fa upstream.

    The field is no longer initialised so this will crash if running on
    wm8958.

    Reported-by: Thomas Abraham
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Mark Brown
     
  • commit aeb4b88ec0a948efce8e3a23a8f964d3560a7308 upstream.

    When a virtual mater control is created, the driver looks for slave
    elements from the assigned card instance. But this may include the
    elements of other codecs when multiple codecs are on the same HD-audio
    bus. This works at the first time, but it'll give Oops when it's once
    freed and re-created via reconfig sysfs.

    This patch changes the element-look-up strategy to limit only to the
    mixer elements of the same codec.

    Reported-by: David Henningsson
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

12 Nov, 2011

19 commits

  • commit 2af8de8c39cf58e5a5e40a9d5d71332da98e6ba7 upstream.

    Since there is no current software control for these they would otherwise
    be left enabled, consuming power.

    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Mark Brown
     
  • commit 4f4488abc97c1c27ff029f887944e6a6da1f5733 upstream.

    The WM8962 has a separate software reset for the PLL registers. Ensure that
    these are reset also on startup.

    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Mark Brown
     
  • commit 5a7c5f26df3c0122814dfa1c13ef6dfbdbffdb86 upstream.

    Set `invert' bit for Capture Switch. Otherwise analogue is muted when
    Capture Switch is ON.

    Signed-off-by: Hong Xu
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Hong Xu
     
  • commit d558cfc30064a97c2c65dbd2b3a4f5a1dea7ec1b upstream.

    Current implementation in wm8711_set_dai_fmt always clear BIT[3:2]
    (the Input Audio Data Bit Length Select) of WM8711_IFACE(07h) register.
    Input Audio Data Bit Length Select bits are set by wm8711_hw_params,
    we should leave BIT[3:2] untouched in wm8711_set_dai_fmt.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit 04c57163c8edfbc50e022737014069998ba4fc5f upstream.

    The Input Audio Data Bit Length Select is controlled by BIT[3:2] of
    WM8711_IFACE(07h) register.
    Current code incorrectly masks BIT[1:0] which is for Audio Data Format Select.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit 51e4152a969aa6d2306492ebf143932dcb535c9b upstream.

    Some BIOS report invalid pins as digital output pins. The driver checks
    the connection but it doesn't do it fully correctly, and it leaves some
    undefined value as the audio-out widget, which makes the driver spewing
    warnings. This patch fixes the issue.

    Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348

    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit ad5d8755116b431f0709c745ee17cb567a478d43 upstream.

    These codecs have SPDIF-in, which is new to the 92HD83xxx compatible
    families, so a bit of logic is added to support them.

    Signed-off-by: Charles Chin
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Charles Chin
     
  • commit 35c11777b906042eca9e6f1c03e464726c7faa07 upstream.

    The power-widget control in patch_stac92hd83xxx() never worked properly,
    thus it's safer to turn it off as default for now.

    Signed-off-by: Charles Chin
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Charles Chin
     
  • commit 862a6244eb9f9f5123fe819454fcfcae0ee1f2f9 upstream.

    If the device is unplugged while running, it is possible for a PCM
    device to be closed after the disconnect callback has returned. This
    means that kill_stream_urb() and disable_iso_interface() would try to
    access already-invalid or freed USB data structures.

    The function free_usb_related_resources() was intended to prevent this,
    but forgot to clear the affected variables.

    Reported-and-tested-by: Olivier Courtay
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     
  • commit 6b45214277bec2193ad3ccb8d7aa6100b5a0f1a9 upstream.

    It seems that Conexant CX20549 chip handle only a single input-amp even
    though the audio-input widget has multiple sources. This has been never
    clear, and I implemented in the current way based on the debug information
    I got at the early time -- the device reacts individual input-amp values
    for different sources. This is true for another Conexant codec, but it's
    not applied to CX20549 actually.

    This patch changes the auto-parser code to handle a single input-amp
    per audio-in widget for CX20549. After applying this, you'll see only a
    single "Capture" volume control instead of separate "Mic" or "Line"
    captures when the device is set up to use a single ADC.

    We haven't tested 20551 and 20561 codecs yet. If these show the similar
    behavior like 20549, they need to set spec->single_adc_amp=1, too.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit fbc7c62a3ff831aef24894b7982cd1adb2b7e070 upstream.

    Signed-off-by: Susan Gao
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Susan Gao
     
  • commit 38f3f31a0a797bdbcc0cdb12553bbecc2f9a91c4 upstream.

    Also fix return values for speaker switch updates.

    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Mark Brown
     
  • commit 35024f4922f7b271e7529673413889aa3d51c5fc upstream.

    Signed-off-by: Axel Lin
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit 7c04241acbdaf97f1448dcccd27ea0fcd1a57684 upstream.

    ak4535_reg should be 8bit, but cache table is defined as 16bit.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit 19b115e523208a926813751aac8934cf3fc6085e upstream.

    ak4642 register was 8bit, but cache table was defined as 16bit.
    ak4642 doesn't work correctry without this patch.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Kuninori Morimoto
     
  • commit 3a340104fad6ecbea5ad6792a2ea855f0507a6e0 upstream.

    According to the datasheet:
    Format Control (05h)
    BITS[3:2]
    FMT[1:0] Audio data format selection
    00 = right justified mode
    01 = left justified mode
    10 = I2S mode
    11 = DSP mode
    BIT[4] LRP Polarity selec for LRCLK/DSP mode select
    0 = normal LRCLK poalrity/DSP mode A
    1 = inverted LRCLK poarity/DSP mode B

    For SND_SOC_DAIFMT_DSP_A, we should set 0x000C instead of 0x0003.
    For SND_SOC_DAIFMT_DSP_B, we should set 0x001C instead of 0x0013.

    Signed-off-by: Axel Lin
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit 5927f94700e860ae27ff24e7f3bc9e4f7b9922eb upstream.

    Reported-by: Chris Paulson-Ellis
    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit cc667a72d471e79fd8e5e291ea115923cf44dca0 upstream.

    The revision 0x100300 was found for ALC662. It seems to work well
    with patch_alc662.

    BugLink: http://bugs.launchpad.net/bugs/877373
    Tested-by: Shengyao Xue
    Signed-off-by: David Henningsson
    Acked-by: Kailang Yang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Henningsson
     
  • commit 6c5c04e509b7000617b09d4301f0b9b6d171d1e6 upstream.

    The purpose of this patch is to remove a section of "bad" code that
    assigns the last DAC to ports E or F in order to support notebooks
    with docking in earlier days, around ALSA 1.0.19 - 21. This is not
    necessary now and actually breaks some configurations that use these
    ports as other devices. This have been tested on several different
    configurations to make sure that it is working for different combinations.

    Signed-off-by: Charles Chin
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Charles Chin
     

25 Oct, 2011

2 commits

  • commit 051a8cb6550d917225ead1cd008b5966350f6d53 upstream.

    The previous fix for the position-buffer check gives yet another
    regression on a Dell laptop. The safest fix right now is to add a
    static quirk for this device (and better to apply it for stable
    kernels too).

    Reported-by: Éric Piel
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit ca201c096269ee2d40037fea96a59fd0695888c4 upstream.

    This is patch for Conexant codec of Intel HDA driver, adding new quirk
    for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for
    T520 (similar subsystem ID is used also in W520 model) and detects more
    mixer features compared to generic (fallback) Lenovo quirk with
    hardcoded options in Conexant codec.

    Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any
    problems.

    Signed-off-by: Daniel Suchy
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Daniel Suchy
     

17 Oct, 2011

2 commits

  • commit 21d17dd2a377ba894f26989915eb3c6e427a3656 upstream.

    Current code set update bits for WM8753_LDAC and WM8753_RDAC twice,
    but missed setting update bits for WM8753_LADC and WM8753_RADC.

    I think it is a copy-paste bug in commit 776065
    "ASoC: codecs: wm8753: Fix register cache incoherency".

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit eff919ac0fc7565e71ffa35657c333dd8cdc0520 upstream.

    A recent conversion has introduced references to &pdev->dev, which does
    not actually exist in all the contexts it's used in.

    Replace this with card->dev where necessary, in order to let
    the driver build again.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

04 Oct, 2011

5 commits

  • commit 46724c2e023cb7ba5cd5000dee6481f0a15ebed9 upstream.

    BugLink: http://bugs.launchpad.net/bugs/854468
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Henningsson
     
  • commit 61a6a108d15213f5ee06332e1e7766d3860e4453 upstream.

    Before clearing the probing flag in the error exit path, check that the
    chip pointer is not NULL.

    Signed-off-by: Thomas Pfaff
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pfaff
     
  • commit 6656b15d675c9c6a049db48d50994b3cd4e76bd6 upstream.

    This patch is necessary to make internal speakers work on this chip.

    BugLink: http://bugs.launchpad.net/bugs/854468
    Tested-by: Alex Wolfson
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Henningsson
     
  • commit 5fe6e0151dbd969f5fbcd94d05c968b76d76952b upstream.

    When the headphone pin is assigned as primary output to line_out_pins[],
    the automatic HP-pin assignment by ASSID must be suppressed. Otherwise
    a wrong pin might be assigned to the headphone and breaks the auto-mute.

    Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104

    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 9058020cd9ae3423d6fe7de591698dc96b6701aa upstream.

    Currently the the internal oscillator is powered down when entering BIAS_OFF
    state, but not re-enabled when going back to BIAS_STANDBY. As a result the
    CODEC will stop working after suspend if the internal oscillator is used to
    generate the sysclock signal. This patch fixes it by clearing the appropriate
    bit in the power down register when the CODEC is re-enabled.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen