05 May, 2014

1 commit

  • Since commit 1df5a06a ("ALSA: hda - hdmi: Fix programmed active channel
    count") channel count is no longer being set if monitor_present is 0.
    This is because setting the count was moved after the CA value is
    determined, which is only after the monitor_present check in
    hdmi_setup_audio_infoframe().

    Unfortunately, in some cases, such as with a non-spec-compliant codec or
    with a problematic video driver, monitor_present is always 0. As a
    specific example, this seems to happen with gen1 ATV (SiI1390 codec),
    causing left-channel-only stereo playback (multi-channel playback has
    apparently never worked with this codec despite it reporting 8 channels,
    reason unknown).

    Simply setting converter channel count without setting the pin infoframe
    and channel mapping as well does not theoretically make much sense as
    this will just mean they are out-of-sync and multichannel playback will
    have a wrong channel mapping.

    However, adding back just setting the converter channel count even in
    no-monitor case is the safest change which at least fixes the stereo
    playback regression on SiI1390 codec. Do that.

    Signed-off-by: Anssi Hannula
    Reported-by: Stephan Raue
    Tested-by: Stephan Raue
    Cc: # 3.12+
    Signed-off-by: Takashi Iwai

    Anssi Hannula
     

03 May, 2014

4 commits

  • The TEAC UD-H01 firmware sends wrong feedback frequency values, thus
    causing the PC to send the samples at a wrong rate, which results in
    clicks and crackles in the output.

    Add a workaround to detect and fix the corruption.

    Signed-off-by: Clemens Ladisch
    [mick37@gmx.de: use sender->udh01_fb_quirk rather than
    ep->udh01_fb_quirk in snd_usb_handle_sync_urb()]
    Reported-and-tested-by: Mick
    Reported-and-tested-by: Andrea Messa
    Cc:
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • The recent addition of the USB audio mixer suspend/resume may lead to
    deadlocks when the driver tries to call usb_autopm_get_interface()
    recursively, since the function tries to sync with the finish of the
    other calls. For avoiding it, introduce a flag indicating the resume
    operation and avoids the recursive usb_autopm_get_interface() calls
    during the resume.

    Reported-and-tested-by: Bryan Quigley
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The suspend callback of usb-audio driver may be called multiple times
    per suspend when multiple USB interfaces are bound to a single sound
    card instance. In such a case, it's superfluous to save the mixer
    values multiple times. This patch fixes it by checking the counter.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This (widely used) construction:

    if(printk_ratelimit())
    dev_dbg()

    Causes the ratelimiting to spam the kernel log with the "callbacks suppressed"
    message below, even while the dev_dbg it is supposed to rate limit wouldn't
    print anything because DEBUG is not defined for this device.

    [ 533.803964] retire_playback_urb: 852 callbacks suppressed
    [ 538.807930] retire_playback_urb: 852 callbacks suppressed
    [ 543.811897] retire_playback_urb: 852 callbacks suppressed
    [ 548.815745] retire_playback_urb: 852 callbacks suppressed
    [ 553.819826] retire_playback_urb: 852 callbacks suppressed

    So use dev_dbg_ratelimited() instead of this construction.

    Signed-off-by: Sander Eikelenboom
    Signed-off-by: Takashi Iwai

    Sander Eikelenboom
     

30 Apr, 2014

2 commits

  • When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
    SID: 0x1028067e), the headset mic can't be detected, after apply this
    patch, the headset mic can work well.

    BugLink: https://bugs.launchpad.net/bugs/1297581
    Cc: David Henningsson
    Cc: stable@vger.kernel.org
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai

    Hui Wang
     
  • The recent commit (ca460f86521) changed the CORB RP reset procedure to
    follow the specification with a couple of sanity checks.
    Unfortunately, Nvidia controller chips seem not following this way,
    and spew the warning messages like:
    snd_hda_intel 0000:00:10.1: CORB reset timeout#1, CORBRP = 0

    This patch adds the workaround for such chips. It just skips the new
    reset procedure for the known broken chips.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

28 Apr, 2014

1 commit

  • When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
    SID: 0x10280674), the headset mic can't be detected, after apply this
    patch, the headset mic can work well.

    BugLink: https://bugs.launchpad.net/bugs/1297581
    Cc: David Henningsson
    Cc: stable@vger.kernel.org
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai

    Hui Wang
     

23 Apr, 2014

5 commits

  • …ar', 'asoc/fix/tlv320aic31xx' and 'asoc/fix/tlv320aic3x' into asoc-linus

    Mark Brown
     
  • …/cs42l73' and 'asoc/fix/fsl-spdif' into asoc-linus

    Mark Brown
     
  • Mark Brown
     
  • Commit 0406a40a0 ("ASoC: jz4740: Use the generic dmaengine PCM driver")
    jz4740-pcm.c file, but neglected to remove the Makefile entries.

    Fixes: 0406a40a0 ("ASoC: jz4740: Use the generic dmaengine PCM driver")
    Reported-by: kbuild test robot
    Reported-by: Ralf Baechle
    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • There were occasional ADSP crash during reboot testing:

    [ 11.883364] BUG: unable to handle kernel paging request at ffffc90121700000
    [ 11.883380] IP: [] sst_module_insert_fixed_block+0x24f/0x26d [snd_soc_sst_dsp]
    [ 11.883397] PGD 7800b067 PUD 0
    [ 11.883405] Oops: 0002 [#1] SMP
    [ 11.886418] gsmi: Log Shutdown Reason 0x03

    The virtual address, ffffc90121700000, was out of range. The virtual
    address is calculated by adding LPE base address with an offset:

    sst_memcpy32(dsp->addr.lpe + data->offset, data->data, data->size);

    The offset is calculated in sst_byt_parse_module, by subtraction of
    two virtual addresses dsp->addr.fw_ext and dsp->addr.lpe:

    block_data.offset = block->ram_offset + (dsp->addr.fw_ext - dsp->addr.lpe);

    These virtual addresses are assigned by kernel from ioremap:

    sst->addr.lpe = ioremap(pdata->lpe_base, pdata->lpe_size);
    sst->addr.fw_ext = ioremap(pdata->fw_base, pdata->fw_size);

    In current driver code, offset is defined as unsigned int32:

    struct sst_module_data {
    ...
    u32 offset; /* offset in FW file */
    };

    Most of the time kernel assigned virtual addresses with addr.fw_ext
    greater than addr.lpe. But sometimes it was the other way round.

    Fix the problem by declaring offset as signed int32_t.

    Signed-off-by: Wenkai Du
    Signed-off-by: Jarkko Nikula
    Signed-off-by: Mark Brown

    Wenkai Du
     

21 Apr, 2014

1 commit

  • Commit 9e1fda4ae158 ("ASoC: dapm: Implement mixer input auto-disable")
    is trying to free the widget it allocated by snd_soc_dapm_new_control()
    call in dapm_kcontrol_data_alloc() by adding kfree(data->widget) to
    dapm_kcontrol_free().

    This is causing a widget double free with auto-disabled DAPM kcontrols
    in sound card unregistration because widgets are already freed before
    dapm_kcontrol_free() is called.

    Reason for that is all widgets are added into dapm->card->widgets list
    in snd_soc_dapm_new_control() and freed in dapm_free_widgets() during
    execution of snd_soc_dapm_free().

    Now snd_soc_dapm_free() calls for different DAPM contexts happens before
    snd_card_free() call from where the call chain to dapm_kcontrol_free()
    begins:

    soc_cleanup_card_resources()
    soc_remove_dai_links()
    soc_remove_link_dais()
    snd_soc_dapm_free(&cpu_dai->dapm)
    soc_remove_link_components()
    soc_remove_platform()
    snd_soc_dapm_free(&platform->dapm)
    soc_remove_codec()
    snd_soc_dapm_free(&codec->dapm)
    snd_soc_dapm_free(&card->dapm)
    snd_card_free()
    snd_card_do_free()
    snd_device_free_all()
    snd_device_free()
    snd_ctl_dev_free()
    snd_ctl_remove()
    snd_ctl_free_one()
    dapm_kcontrol_free()

    This wasn't making harm with ordinary DAPM kcontrols since data->widget is NULL for
    them.

    Fixes: 9e1fda4ae158 (ASoC: dapm: Implement mixer input auto-disable)
    Signed-off-by: Jarkko Nikula
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Jarkko Nikula
     

19 Apr, 2014

2 commits


18 Apr, 2014

3 commits


16 Apr, 2014

2 commits


15 Apr, 2014

2 commits

  • Commit 0cd257bf9b9b0cbb4fa1a5c988a232506997867c, "ASoC: alc5623:
    Convert to direct regmap API usage" broke probing of the codec,
    because of wrong endinness of the ID and codec version read from the
    device. Fix this by removing the existing flipping of the endiannes,
    and extracting the codec type byte from the word from the regmap.

    Signed-off-by: Andrew Lunn
    Signed-off-by: Mark Brown

    Andrew Lunn
     
  • Currently the second tlv320aic3x instance fails to
    be probed from DT if the reset pin is shared with
    the first one.

    This patch fixes it by moving the list add of the
    reset pin into the i2c_probe method.

    Signed-off-by: Sebastian Reichel
    Signed-off-by: Mark Brown

    Sebastian Reichel
     

14 Apr, 2014

2 commits


11 Apr, 2014

2 commits

  • As with the previous commit, before a clock can be used it must be prepared
    for use. Change from clk_enable() and clk_disable() to the versions of the
    calls which also prepare and un-prepare the clocks.

    Will fix warnings from the clock code when this is used.

    Signed-off-by: Ben Dooks
    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Ben Dooks
     
  • Pull sound fixes from Takashi Iwai:
    "Here is a bunch of small fixes that have been collected since the
    previous pull request. In addition to various misc fixes, the
    following are included:

    - HD-audio quirks for Dell, HP, Chromebook, and ALC28x codecs
    - HD-audio AMD HDMI regression fix
    - Continued PM support/fixes for ice1712 driver
    - Multiplatform fixes for ASoC samsung drivers
    - Addition of device id tables to a few ASoC drivers
    - Bit clock polarity config and error flag fixes in ASoC fsl_sai"

    * tag 'sound-fix-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits)
    ALSA: usb-audio: Suppress repetitive debug messages from retire_playback_urb()
    ALSA: hda - Make full_reset boolean
    ALSA: hda - add headset mic detect quirk for a Dell laptop
    sound: dmasound: use module_platform_driver_probe()
    ALSA: au1x00: use module_platform_driver()
    ALSA: hda - Use runtime helper to check active state.
    ALSA: ice1712: Fix boundary checks in PCM pointer ops
    ASoC: davinci-mcasp: Fix bit clock polarity settings
    ASoC: samsung: Fix build on multiplatform
    ASoC: fsl_sai: Fix Bit Clock Polarity configurations
    ALSA: hda - Do not assign streams in reverse order
    ALSA: hda/realtek - Add eapd shutup to ALC283
    ALSA: hda/realtek - Change model name alias for ChromeOS
    ASoC: da732x: Print correct major id
    ALSA: hda/realtek - Improve HP depop when system change power state on Chromebook
    ASoC: cs42l52: Fix mask for REVID
    sound/oss: Remove uncompilable DBG macro use
    ALSA: ice1712: Save/restore routing and rate registers
    ALSA: ice1712: restore AK4xxx volumes on resume
    ASoC: alc56(23|32): fix undefined return value of probing code
    ...

    Linus Torvalds
     

10 Apr, 2014

1 commit

  • BugLink: http://bugs.launchpad.net/bugs/1305133

    Malfunctioning or slow devices can cause a flood of dmesg SPAM.

    I've ignored checkpatch.pl complaints about the use of printk_ratelimit() in favour
    of prior art in sound/usb/pcm.c.

    WARNING: Prefer printk_ratelimited or pr__ratelimited to printk_ratelimit
    + if (printk_ratelimit() &&

    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Eldad Zack
    Cc: Daniel Mack
    Cc: Clemens Ladisch
    Signed-off-by: Tim Gardner
    Signed-off-by: Takashi Iwai

    Tim Gardner
     

09 Apr, 2014

8 commits


08 Apr, 2014

4 commits

  • PCM pointer callbacks in ice1712 driver check the buffer size boundary
    wrongly between bytes and frames. This leads to PCM core warnings
    like:
    snd_pcm_update_hw_ptr0: 105 callbacks suppressed
    ALSA pcm_lib.c:352 BUG: pcmC3D0c:0, pos = 5461, buffer size = 5461, period size = 2730

    This patch fixes these checks to be placed after the proper unit
    conversions.

    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • IB_NF, NB_IF and IB_IF configured the bc polarity incorrectly. The receive
    polarity was set to the same edge as the TX in these cases.

    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Mark Brown

    Peter Ujfalusi
     
  • PCM and S/PDIF drivers referenced mach headers for a trivial
    data structure. This caused build errors on multiplatform builds
    as machine headers are not accessible from driver files. Move the data
    structure definition to the driver header and remove the dependency.
    While at it rename the structure to avoid multiple definition errors
    as the same structure is also used by the platform code.

    Signed-off-by: Sachin Kamat
    Signed-off-by: Mark Brown

    Sachin Kamat
     
  • The BCP bit in TCR4/RCR4 register rules as followings:
    0 Bit clock is active high with drive outputs on rising edge
    and sample inputs on falling edge.
    1 Bit clock is active low with drive outputs on falling edge
    and sample inputs on rising edge.

    For all formats currently supported in the fsl_sai driver, they're exactly
    sending data on the falling edge and sampling on the rising edge.

    However, the driver clears this BCP bit for all of them which results click
    noise when working with SGTL5000 and big noise with WM8962.

    Thus this patch corrects the BCP settings for all the formats here to fix
    the nosie issue.

    Signed-off-by: Nicolin Chen
    Acked-by: Xiubo Li
    Signed-off-by: Mark Brown

    Nicolin Chen