12 May, 2016

1 commit


11 May, 2016

1 commit

  • The HDMI/DP audio output on ATI/AMD chips got broken due to the recent
    restructuring of chmap. Fortunately, Daniel Exner could bisect, and
    pointed the culprit commit [739ffee97ed5: ALSA: hda - Add hdmi chmap
    verb programming ops to chmap object].

    This commit moved some ops from hdmi_ops to chmap_ops, and reassigned
    the ops in the embedded chmap object in hdmi_spec instead.
    Unfortunately, the reassignment of these ops in patch_atihdmi() were
    moved into an if block that is performed only for old chips. Thus, on
    newer chips, the generic ops is still used, which doesn't work for
    such ATI/AMD chips.

    This patch addresses the regression, simply by moving the assignment
    of chmap ops to the right place.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=114981
    Fixes: 739ffee97ed5 ('ALSA: hda - Add hdmi chmap verb programming ops to chmap object')
    Reported-and-tested-by: Daniel Exner
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

10 May, 2016

2 commits

  • Subwoofer does not work out of the box on ASUS N751/N551 laptops. This
    patch fixes it. Patch tested on N751 laptop. N551 part is not tested,
    but according to [1] and [2] this laptop requires similar changes, so I
    included them in the patch.

    1. https://github.com/honsiorovskyi/asus-n551-hda-fix
    2. https://bugs.launchpad.net/ubuntu/+source/alsa-tools/+bug/1405691

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117781
    Signed-off-by: Yura Pakhuchiy
    Cc:
    Signed-off-by: Takashi Iwai

    Yura Pakhuchiy
     
  • The HD-audio reconfig function got broken in the recent kernels,
    typically resulting in a failure like:
    snd_hda_intel 0000:00:1b.0: control 3:0:0:Playback Channel Map:0 is already present

    This is because of the code restructuring to move the PCM and control
    instantiation into the codec drive probe, by the commit [bcd96557bd0a:
    ALSA: hda - Build PCMs and controls at codec driver probe]. Although
    the commit above removed the calls of snd_hda_codec_build_pcms() and
    *_build_controls() at the controller driver probe, the similar calls
    in the reconfig were still left forgotten. This caused the
    conflicting and duplicated PCMs and controls.

    The fix is trivial: just remove these superfluous calls from
    reconfig_codec().

    Fixes: bcd96557bd0a ('ALSA: hda - Build PCMs and controls at codec driver probe')
    Reported-by: Jochen Henneberg
    Cc: # v4.1+
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

09 May, 2016

1 commit


29 Apr, 2016

1 commit


27 Apr, 2016

5 commits


26 Apr, 2016

2 commits

  • The recent bug report suggests that BCLK setup for i915 HSW/BDW needs
    to be updated at each HDMI hotplug, not only at initialization and
    resume. That is, we need to update HSW_EM4 and HSW_EM5 registers at
    ELD notification, too. Otherwise the HDMI audio may be out of sync
    and played in a wrong pitch.

    However, the HDA codec driver has no access to the controller
    registers, and currently the code managing these registers is in
    hda_intel.c, i.e. local to the controller driver. For allowing the
    explicit BCLK update from the codec driver, as in this patch, the
    former haswell_set_bclk() in hda_intel.c is moved to hdac_i915.c and
    exposed as snd_hdac_i915_set_bclk(). This is called from both the HDA
    controller driver and intel_pin_eld_notify() in HDMI codec driver.

    Along with this change, snd_hdac_get_display_clk() gets dropped as
    it's no longer used.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91410
    Cc: # v4.5+
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Fixes audio output on a ThinkPad X260, when using Lenovo CES 2013
    docking station series (basic, pro, ultra).

    Signed-off-by: Conrad Kostecki
    Cc:
    Signed-off-by: Takashi Iwai

    Conrad Kostecki
     

23 Apr, 2016

1 commit

  • Pull sound fixes from Takashi Iwai:
    "Again a relatively calm week without surprise: most of fixes are about
    HD-audio, including fixes for Cirrus codec regression and a race over
    regmap access. Although both change are slightly unintuitive, the
    risk of further breakage is quite low, I hope.

    Other than that, all the rest are trivial"

    * tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Fix possible race on regmap bypass flip
    ALSA: pcxhr: Fix missing mutex unlock
    ALSA: hda - add PCI ID for Intel Broxton-T
    ALSA: hda - Keep powering up ADCs on Cirrus codecs
    ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m
    ALSA - hda: hdmi check NULL pointer in hdmi_set_chmap
    ALSA: hda - Don't trust the reported actual power state

    Linus Torvalds
     

21 Apr, 2016

2 commits

  • HD-audio driver uses regmap cache bypass feature for reading a raw
    value without the cache. But this is racy since both the cached and
    the uncached reads may occur concurrently. The former is done via the
    normal control API access while the latter comes from the proc file
    read.

    Even though the regmap itself has the protection against the
    concurrent accesses, the flag set/reset is done without the
    protection, so it may lead to inconsistent state of bypass flag that
    doesn't match with the current read and occasionally result in a
    kernel WARNING like:
    WARNING: CPU: 3 PID: 2731 at drivers/base/regmap/regcache.c:499 regcache_cache_only+0x78/0x93

    One way to work around such a problem is to wrap with a mutex. But in
    this case, the solution is simpler: for the uncached read, we just
    skip the regmap and directly calls its accessor. The verb execution
    there is protected by itself, so basically it's safe to call
    individually.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The commit [9bef72bdb26e: ALSA: pcxhr: Use nonatomic PCM ops]
    converted to non-atomic PCM ops, but shamelessly with an unbalanced
    mutex locking, which leads to the hangup easily. Fix it.

    Fixes: 9bef72bdb26e ('ALSA: pcxhr: Use nonatomic PCM ops')
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116441
    Cc: # 3.18+
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

20 Apr, 2016

2 commits

  • Add HD Audio Device PCI ID for the Intel Broxton-T platform.
    It is an HDA Intel PCH controller.

    Signed-off-by: Lu, Han
    Cc:
    Signed-off-by: Takashi Iwai

    Lu, Han
     
  • Although one weird behavior about the input path (inconsistent D0/D3
    switch) on Cirrus CS420x codecs was fixed in the previous commit,
    there is still an issue on some Mac machines: the capture stream
    stalls when switching the ADCs on the fly. More badly, this keeps
    stuck until the next reboot.

    The dynamic ADC switching is already a bit fragile and assuming
    optimistically that the chip accepts the frequent power changes. On
    Cirrus codecs, this doesn't seem applicable.

    As a quick workaround, we pin down the ADCs to keep up in D0 when
    spec->dyn_adc_switch is set. In this way, the ADCs are kept up only
    for the system that were confirmed to be broken.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
    Cc: # v4.4+
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

18 Apr, 2016

2 commits

  • The Optiplex 9020m with Haswell-DT processor needs a quirk for the
    headset jack at the front of the machine to be able to use microphones.

    A quirk for this model was originally added in 3127899, but c77900e
    removed it in favour of a more generic version.

    Unfortunately, pin configurations can changed based on firmware/BIOS
    versions, and the generic version doesn't have any effect on newer
    versions of the machine/firmware anymore.

    With help from David Henningsson

    Signed-off-by: Bastien Nocera
    Tested-by: Bastien Nocera
    Cc:
    Signed-off-by: Takashi Iwai

    Bastien Nocera
     
  • Make sure per_pin is not NULL before using it.

    Fixes: 9b3dc8aa3fb1 ('ALSA: hda - Register chmap obj as priv data instead of codec')
    Signed-off-by: Libin Yang
    Signed-off-by: Takashi Iwai

    Libin Yang
     

17 Apr, 2016

1 commit

  • We've got a regression report that the recording on Mac with a cirrus
    codec doesn't work any longer. This turned out to be the missing
    power up to D0 by power_save_node enablement.

    After analyzing the traces, we found out that the culprit is that the
    codec advertises the "actual" power state of a few nodes to be D0
    while the "target" power state is D3. This inconsistency is usually
    OK, as it implies the power transition. But in the case of cirrus
    codec, this seems to be stuck to D3 while it's not actually D0.

    This patch addresses the issue by checking the power state difference
    more strictly. It sends the power-state change verb unless both the
    target and the actual power states show the given value.

    We may introduce yet another flag indicating the possible broken
    hardware power state, but it's anyway safer to set the proper power
    state even in a transition (at least it's harmless as long as the
    target state is same). So this simpler change was applied now.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
    Cc: # v4.4+
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

16 Apr, 2016

2 commits


15 Apr, 2016

1 commit

  • Pull sound fixes from Takashi Iwai:
    "We've had a very calm development cycle, so far. Here are the few
    fixes for HD-audio and USB-audio, all of which are small and easy"

    * tag 'sound-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Fix inconsistent monitor_present state until repoll
    ALSA: hda - Fix regression of monitor_present flag in eld proc file
    ALSA: usb-audio: Skip volume controls triggers hangup on Dell USB Dock
    ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T460s
    ALSA: sscape: Use correct format identifier for size_t
    ALSA: usb-audio: Add a quirk for Plantronics BT300
    ALSA: usb-audio: Add a sample rate quirk for Phoenix Audio TMX320
    ALSA: hda - Bind with i915 only when Intel graphics is present

    Linus Torvalds
     

13 Apr, 2016

2 commits

  • While the previous commit fixed the missing monitor_present flag
    update, it may be still in an inconsistent state while the driver
    repolls: the flag itself is updated, but the eld_valid flag and the
    contents don't follow until the repoll finishes (and may be repeated
    for a few times).

    The basic problem is that pin_eld->monitor_present is updated in the
    caller side. This should have been updated only in update_eld(). So,
    the proper fix is to avoid accessing pin_eld but only spec->temp_eld.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The commit [bd48128539ab: ALSA: hda - Fix forgotten HDMI
    monitor_present update] covered the missing update of monitor_present
    flag, but this caused a regression for devices without the i915 eld
    notifier. Since the old code supposed that pin_eld->monitor_present
    was updated by the caller side, the hdmi_present_sense_via_verbs()
    doesn't update the temporary eld->monitor_present but only
    pin_eld->monitor_present, which is now overridden in update_eld().

    The fix is to update pin_eld->monitor_present as well before calling
    update_eld().

    Note that this may still leave monitor_present flag in an inconsistent
    state when the driver repolls, but this is at least the old behavior.
    More proper fix will follow in the later patch.

    Fixes: bd48128539ab ('ALSA: hda - Fix forgotten HDMI monitor_present update')
    Signed-off-by: Hyungwon Hwang
    Cc:
    Signed-off-by: Takashi Iwai

    Hyungwon Hwang
     

12 Apr, 2016

2 commits

  • This is Dell usb dock audio workaround.
    It was fixed the master volume keep lower.

    [Some background: the patch essentially skips the controls of a couple
    of FU volumes. Although the firmware exposes the dB and the value
    information via the usb descriptor, changing the values (we set the
    min volume as default) screws up the device. Although this has been
    fixed in the newer firmware, the devices are shipped with the old
    firmware, thus we need the workaround in the driver side. -- tiwai]

    Signed-off-by: Kailang Yang
    Cc:
    Signed-off-by: Takashi Iwai

    Kailang Yang
     
  • FW expects sampling rate rounded up to next higher integer value
    when calculating ibs/obs. For example for 44.1k, it should be
    rounded up to 45 to calculate ibs/obs.

    Signed-off-by: Subhransu S. Prusty
    Signed-off-by: Vinod Koul
    Signed-off-by: Mark Brown

    Subhransu S. Prusty
     

11 Apr, 2016

2 commits

  • The Lenovo Thinkpad T460s requires the alc_fixup_tpt440_dock as well in
    order to get working sound output on the docking stations headphone jack.

    Patch tested on a Thinkpad T460s (20F9CT01WW) using a ThinkPad Ultradock
    on kernel 4.4.6.

    Signed-off-by: Sven Eckelmann
    Tested-by: Simon Wunderlich
    Cc:
    Signed-off-by: Takashi Iwai

    Sven Eckelmann
     
  • The 'size' member of a struct firmware is passed to snd_printk with a
    respective format string using the %d identifier. The 'size' member is
    of type size_t, but format identifier %d indicates a signed int data
    type. This patch replaces the %d format identifier with the correct %zu
    format identifier for size_t data types.

    Signed-off-by: William Breathitt Gray
    Signed-off-by: Takashi Iwai

    William Breathitt Gray
     

07 Apr, 2016

1 commit


06 Apr, 2016

1 commit


05 Apr, 2016

1 commit

  • Pull media fixes from Mauro Carvalho Chehab:
    "Some bug fixes on au0828 and snd-usb-audio:

    - the au0828+snd-usb-audio MC patch broke several things and produced
    some race conditions. Better to revert the patches, and re-work on
    them for a next version

    - fix a regression at tuner disable links logic

    - properly handle dev_state as a bitmask"

    * tag 'media/v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] Revert "[media] media: au0828 change to use Managed Media Controller API"
    [media] Revert "[media] sound/usb: Use Media Controller API to share media resources"
    [media] au0828: Fix dev_state handling
    [media] au0828: fix au0828_v4l2_close() dev_state race condition
    [media] media: au0828 fix to clear enable/disable/change source handlers
    [media] v4l2-mc: cleanup a warning
    [media] au0828: disable tuner links and cache tuner/decoder

    Linus Torvalds
     

04 Apr, 2016

2 commits

  • Phoenix Audio TMX320 gives the similar error when the sample rate is
    asked:
    usb 2-1.3: 2:1: cannot get freq at ep 0x85
    usb 2-1.3: 1:1: cannot get freq at ep 0x2
    ....

    Add the corresponding USB-device ID (1de7:0014) to
    snd_usb_get_sample_rate_quirk() list.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110221
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • On Skylake and onwards, the HD-audio controller driver needs to bind
    with i915 for having the control of power well audio domain before
    actually probing the codec. This leads to the load of i915 driver
    from the audio driver side. But, there are systems that have no Intel
    graphics but Nvidia or AMD GPU, although they still use HD-audio bus
    for the onboard audio codecs. On these, loading the i915 driver is
    nothing but a useless memory and CPU consumption.

    A simple way to avoid it is just to look for the Intel graphics PCI
    entry beforehand, and try to bind with i915 only when such an entry is
    found. Currently, it assumes the PCI display class. If another class
    appears, this needs to be extended (although it's very unlikely).

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

03 Apr, 2016

3 commits


02 Apr, 2016

1 commit

  • Pull sound fixes from Takashi Iwai:
    "A collection of small fixes:

    - a fix in ALSA timer core to avoid possible BUG() trigger
    - a fix in ALSA timer core 32bit compat layer
    - a few HD-audio quirks for ASUS and HP machines
    - AMD HD-audio HDMI controller quirks
    - fixes of USB-audio double-free at some error paths
    - a fix for memory leak in DICE driver at hotunplug"

    * tag 'sound-4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: timer: Use mod_timer() for rearming the system timer
    ALSA: hda - fix front mic problem for a HP desktop
    ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
    ALSA: hda: add AMD Polaris-10/11 AZ PCI IDs with proper driver caps
    ALSA: dice: fix memory leak when unplugging
    ALSA: hda - Apply fix for white noise on Asus N550JV, too
    ALSA: hda - Fix white noise on Asus N750JV headphone
    ALSA: hda - Asus N750JV external subwoofer fixup
    ALSA: timer: fix gparams ioctl compatibility for different architectures

    Linus Torvalds
     

01 Apr, 2016

1 commit

  • ALSA system timer backend stops the timer via del_timer() without sync
    and leaves del_timer_sync() at the close instead. This is because of
    the restriction by the design of ALSA timer: namely, the stop callback
    may be called from the timer handler, and calling the sync shall lead
    to a hangup. However, this also triggers a kernel BUG() when the
    timer is rearmed immediately after stopping without sync:
    kernel BUG at kernel/time/timer.c:966!
    Call Trace:

    [] snd_timer_s_start+0x13e/0x1a0
    [] snd_timer_interrupt+0x504/0xec0
    [] ? debug_check_no_locks_freed+0x290/0x290
    [] snd_timer_s_function+0xb4/0x120
    [] call_timer_fn+0x162/0x520
    [] ? call_timer_fn+0xcd/0x520
    [] ? snd_timer_interrupt+0xec0/0xec0
    ....

    It's the place where add_timer() checks the pending timer. It's clear
    that this may happen after the immediate restart without sync in our
    cases.

    So, the workaround here is just to use mod_timer() instead of
    add_timer(). This looks like a band-aid fix, but it's a right move,
    as snd_timer_interrupt() takes care of the continuous rearm of timer.

    Reported-by: Jiri Slaby
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai