01 Oct, 2020

7 commits

  • commit f73bbf639b32acb6b409e188fdde5644b301978f upstream.

    On Lenovo P520, the front panel headset LED isn't lit up right now.

    Realtek states that the LED needs to be enabled by ALC233's GPIO2, so
    let's do it accordingly to light the LED up.

    Signed-off-by: Kai-Heng Feng
    Acked-by: Hui Wang
    Cc:
    Link: https://lore.kernel.org/r/20200914070231.13192-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Kai-Heng Feng
     
  • commit 3f74249057827c5f6676c41c18f6be12ce1469ce upstream.

    We found a Mic detection issue on many Lenovo laptops, those laptops
    belong to differnt models and they have different audio design like
    internal mic connects to the codec or PCH, they all have this problem,
    the problem is if plugging a headset before powerup/reboot the
    machine, after booting up, the headphone could be detected but Mic
    couldn't. If we plug out and plug in the headset, both headphone and
    Mic could be detected then.

    Through debugging we found the codec on those laptops are same, it is
    alc257, and if we don't disable the 3k pulldown in alc256_shutup(),
    the issue will be fixed. So far there is no pop noise or power
    consumption regression on those laptops after this change.

    Cc: Kailang Yang
    Cc:
    Signed-off-by: Hui Wang
    Link: https://lore.kernel.org/r/20200914065118.19238-1-hui.wang@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • [ Upstream commit 472eb39103e885f302fd8fd6eff104fcf5503f1b ]

    clang static analysis flags this problem
    hpioctl.c:513:7: warning: Branch condition evaluates to
    a garbage value
    if (pci.ap_mem_base[idx]) {
    ^~~~~~~~~~~~~~~~~~~~

    If there is a failure in the middle of the memory space loop,
    only some of the memory spaces need to be cleaned up.

    At the error handler, idx holds the number of successful
    memory spaces mapped. So rework the handler loop to use the
    old idx.

    There is a second problem, the memory space loop conditionally
    iomaps()/sets the mem_base so it is necessay to initize pci.

    Fixes: 719f82d3987a ("ALSA: Add support of AudioScience ASI boards")
    Signed-off-by: Tom Rix
    Link: https://lore.kernel.org/r/20200913165230.17166-1-trix@redhat.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Tom Rix
     
  • [ Upstream commit a6630529aecb5a3e84370c376ed658e892e6261e ]

    We've received a regression report on Intel HD-audio controller that
    wakes up immediately after S3 suspend. The bisection leads to the
    commit c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not
    needed"). This commit replaces the system-suspend to use
    pm_runtime_force_suspend() instead of the direct call of
    __azx_runtime_suspend(). However, by some really mysterious reason,
    pm_runtime_force_suspend() causes a spurious wakeup (although it calls
    the same __azx_runtime_suspend() internally).

    As an ugly workaround for now, revert the behavior to call
    __azx_runtime_suspend() and __azx_runtime_resume() for those old Intel
    platforms that may exhibit such a problem, while keeping the new
    standard pm_runtime_force_suspend() and pm_runtime_force_resume()
    pair for the remaining chips.

    Fixes: c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not needed")
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208649
    Cc:
    Link: https://lore.kernel.org/r/20200727164443.4233-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     
  • [ Upstream commit 8d6762af302d69f76fa788a277a56a9d9cd275d5 ]

    HD-audio codec driver applies a tricky procedure to forcibly perform
    the runtime resume by mimicking the usage count even if the device has
    been runtime-suspended beforehand. This was needed to assure to
    trigger the jack detection update after the system resume.

    And recently we also applied the similar logic to the HD-audio
    controller side. However this seems leading to some inconsistency,
    and eventually PCI controller gets screwed up.

    This patch is an attempt to fix and clean up those behavior: instead
    of the tricky runtime resume procedure, the existing jackpoll work is
    scheduled when such a forced codec resume is required. The jackpoll
    work will power up the codec, and this alone should suffice for the
    jack status update in usual cases. If the extra polling is requested
    (by checking codec->jackpoll_interval), the manual update is invoked
    after that, and the codec is powered down again.

    Also, we filter the spurious wake up of the codec from the controller
    runtime resume by checking codec->relaxed_resume flag. If this flag
    is set, basically we don't need to wake up explicitly, but it's
    supposed to be done via the audio component notifier.

    Fixes: c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not needed")
    Link: https://lore.kernel.org/r/20200422203744.26299-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     
  • [ Upstream commit c4c8dd6ef807663e42a5f04ea77cd62029eb99fa ]

    The HD-audio controller does system-suspend and resume operations by
    directly calling its helpers __azx_runtime_suspend() and
    __azx_runtime_resume(). However, in general, we don't have to resume
    always the device fully at the system resume; typically, if a device
    has been runtime-suspended, we can leave it to runtime resume.

    Usually for achieving this, the driver would call
    pm_runtime_force_suspend() and pm_runtime_force_resume() pairs in the
    system suspend and resume ops. Unfortunately, this doesn't work for
    the resume path in our case. For handling the jack detection at the
    system resume, a child codec device may need the (literally) forcibly
    resume even if it's been runtime-suspended, and for that, the
    controller device must be also resumed even if it's been suspended.

    This patch is an attempt to improve the situation. It replaces the
    direct __azx_runtime_suspend()/_resume() calls with with
    pm_runtime_force_suspend() and pm_runtime_force_resume() with a slight
    trick as we've done for the codec side. More exactly:

    - azx_has_pm_runtime() check is dropped from azx_runtime_suspend() and
    azx_runtime_resume(), so that it can be properly executed from the
    system-suspend/resume path

    - The WAKEEN handling depends on the card's power state now; it's set
    and cleared only for the runtime-suspend

    - azx_resume() checks whether any codec may need the forcible resume
    beforehand. If the forcible resume is required, it does temporary
    PM refcount up/down for actually triggering the runtime resume.

    - A new helper function, hda_codec_need_resume(), is introduced for
    checking whether the codec needs a forcible runtime-resume, and the
    existing code is rewritten with that.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207043
    Link: https://lore.kernel.org/r/20200413082034.25166-6-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Iwai
     
  • [ Upstream commit 6d011d5057ff88ee556c000ac6fe0be23bdfcd72 ]

    RIRB interrupt status getting cleared after the write pointer is read
    causes a race condition, where last response(s) into RIRB may remain
    unserviced by IRQ, eventually causing azx_rirb_get_response to fall
    back to polling mode. Clearing the RIRB interrupt status ahead of
    write pointer access ensures that this condition is avoided.

    Signed-off-by: Mohan Kumar
    Signed-off-by: Viswanath L
    Link: https://lore.kernel.org/r/1580983853-351-1-git-send-email-viswanathl@nvidia.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Mohan Kumar
     

23 Sep, 2020

3 commits

  • commit fc19d559b0d31b5b831fd468b10d7dadafc0d0ec upstream.

    The Mic connects to the Nid 0x19, but the configuration of Nid 0x19
    is not defined to Mic, and also need to set the coeff to enable the
    auto detection on the Nid 0x19. After this change, the Mic plugging
    in or plugging out could be detected and could record the sound from
    the Mic.

    And the coeff value is suggested by Kailang of Realtek.

    Cc: Kailang Yang
    Cc:
    Signed-off-by: Hui Wang
    Link: https://lore.kernel.org/r/20200909020041.8967-1-hui.wang@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • commit c3cdf189276c2a63da62ee250615bd55e3fb680d upstream.

    The GX502 requires a few steps to enable the headset i/o: pincfg,
    verbs to enable and unmute the amp used for headpone out, and
    a jacksense callback to toggle output via internal or jack using
    a verb.

    Signed-off-by: Luke D Jones
    Cc:
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208005
    Link: https://lore.kernel.org/r/20200907081959.56186-1-luke@ljones.dev
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Luke D Jones
     
  • This reverts commit 982505615063873a896efce767c996792c3db00c which is
    commit 15cbff3fbbc631952c346744f862fb294504b5e2 upstream.

    It causes know regressions and will be reverted in Linus's tree soon.

    Reported-by: Hans de Goede
    Cc: Dan Crawford
    Cc: Takashi Iwai
    Link: https://lore.kernel.org/r/7efd2fe5-bf38-7f85-891a-eee3845d1493@redhat.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

17 Sep, 2020

3 commits

  • [ Upstream commit f804a324a41a880c1ab43cc5145d8b3e5790430d ]

    Add Rocketlake HDMI codec support. Rocketlake shares
    the pin-to-port mapping table with Tigerlake.

    Signed-off-by: Rander Wang
    Reviewed-by: Pierre-Louis Bossart
    Reviewed-by: Ranjani Sridharan
    Signed-off-by: Kai Vehmanen
    Link: https://lore.kernel.org/r/20200902154207.1440393-1-kai.vehmanen@linux.intel.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Rander Wang
     
  • [ Upstream commit 23d63a31d9f44d7daeac0d1fb65c6a73c70e5216 ]

    The WAKEEN bits are used to indicate which bits in the
    STATESTS register may cause wake event during the codec
    state change request. Configure the WAKEEN register for
    the Tegra to detect the wake events.

    Signed-off-by: Mohan Kumar
    Acked-by: Sameer Pujar
    Link: https://lore.kernel.org/r/20200825052415.20626-3-mkumard@nvidia.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Mohan Kumar
     
  • [ Upstream commit 216116eae43963c662eb84729507bad95214ca6b ]

    The Tegra HDA codec HW implementation has an issue related to not
    swapping the 2 channel Audio Sample Packet(ASP) channel mapping.
    Whatever the FL and FR mapping specified the left channel always
    comes out of left speaker and right channel on right speaker. So
    add condition to disallow the swapping of FL,FR during the playback.

    Signed-off-by: Mohan Kumar
    Acked-by: Sameer Pujar
    Link: https://lore.kernel.org/r/20200825052415.20626-2-mkumard@nvidia.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Mohan Kumar
     

10 Sep, 2020

6 commits

  • commit 6a6660d049f88b89fd9a4b9db3581b245f7782fa upstream.

    There've been quite a few regression reports about the lowered volume
    (reduced to ca 65% from the previous level) on Lenovo Thinkpad X1
    after the commit d2cd795c4ece ("ALSA: hda - fixup for the bass speaker
    on Lenovo Carbon X1 7th gen"). Although the commit itself does the
    right thing from HD-audio POV in order to have a volume control for
    bass speakers, it seems that the machine has some secret recipe under
    the hood.

    Through experiments, Benjamin Poirier found out that the following
    routing gives the best result:
    * DAC1 (NID 0x02) -> Speaker pin (NID 0x14)
    * DAC2 (NID 0x03) -> Shared by both Bass Speaker pin (NID 0x17) &
    Headphone pin (0x21)
    * DAC3 (NID 0x06) -> Unused

    DAC1 seems to have some equalizer internally applied, and you'd get
    again the output in a bad quality if you connect this to the
    headphone pin. Hence the headphone is connected to DAC2, which is now
    shared with the bass speaker pin. DAC3 has no volume amp, hence it's
    not connected at all.

    For achieving the routing above, this patch introduced a couple of
    workarounds:

    * The connection list of bass speaker pin (NID 0x17) is reduced not to
    include DAC3 (NID 0x06)
    * Pass preferred_pairs array to specify the fixed connection

    Here, both workarounds are needed because the generic parser prefers
    the individual DAC assignment over others.

    When the routing above is applied, the generic parser creates the two
    volume controls "Front" and "Bass Speaker". Since we have only two
    DACs for three output pins, those are not fully controlling each
    output individually, and it would confuse PulseAudio. For avoiding
    the pitfall, in this patch, we rename those volume controls to some
    unique ones ("DAC1" and "DAC2"). Then PulseAudio ignore them and
    concentrate only on the still good-working "Master" volume control.
    If a user still wants to control each DAC volume, they can still
    change manually via "DAC1" and "DAC2" volume controls.

    Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen")
    Reported-by: Benjamin Poirier
    Reviewed-by: Jaroslav Kysela
    Tested-by: Benjamin Poirier
    Cc:
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207407#c10
    BugLink: https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3214171
    BugLink: https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3276276
    Link: https://lore/kernel.org/r/20200829112746.3118-1-benjamin.poirier@gmail.com
    Link: https://lore.kernel.org/r/20200903083300.6333-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 8bcea6cb2cbc1f749e574954569323dec5e2920e upstream.

    The Galaxy Book Ion NT950XCJ-X716A (15 inches) uses the same ALC298
    codec as other Samsung laptops which have the no headphone sound bug. I
    confirmed on my own hardware that this fixes the bug.

    This also correct the model name for the 13 inches version. It was
    incorrectly referenced as NT950XCJ-X716A in commit e17f02d05. But it
    should have been NP930XCJ-K01US.

    Fixes: e17f02d0559c ("ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion")
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
    Signed-off-by: Adrien Crivelli
    Cc:
    Link: https://lore.kernel.org/r/20200826084014.211217-1-adrien.crivelli@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Adrien Crivelli
     
  • commit 15cbff3fbbc631952c346744f862fb294504b5e2 upstream.

    Following Christian Lachner's patch for Gigabyte X570-based motherboards,
    also patch the MSI X570-A PRO motherboard; the ALC1220 codec requires the
    same workaround for Clevo laptops to enforce the DAC/mixer connection
    path. Set up a quirk entry for that.

    I suspect most if all X570 motherboards will require similar patches.

    [ The entries reordered in the SSID order -- tiwai ]

    Related buglink: https://bugzilla.kernel.org/show_bug.cgi?id=205275
    Signed-off-by: Dan Crawford
    Cc:
    Link: https://lore.kernel.org/r/20200829024946.5691-1-dnlcrwfrd@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Dan Crawford
     
  • commit 858e0ad9301d1270c02b5aca97537d2d6ee9dd68 upstream.

    When system is suspended with active audio playback to HDMI/DP, two
    alternative sequences can happen at resume:
    a) monitor is detected first and ALSA prepare follows normal
    stream setup sequence, or
    b) ALSA prepare is called first, but monitor is not yet detected,
    so PCM is restarted without a pin,

    In case of (b), on i915 systems, haswell_verify_D0() is not called at
    resume and the pin power state may be incorrect. Result is lack of audio
    after resume with no error reported back to user-space.

    Fix the problem by always verifying converter and pin state in the
    i915_pin_cvt_fixup().

    BugLink: https://github.com/thesofproject/linux/issues/2388
    Signed-off-by: Kai Vehmanen
    Cc:
    Link: https://lore.kernel.org/r/20200826170306.701566-1-kai.vehmanen@linux.intel.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Kai Vehmanen
     
  • commit ee0761d1d8222bcc5c86bf10849dc86cf008557c upstream.

    snd_ca0106_spi_write() returns 1 on error, snd_ca0106_pcm_power_dac()
    is returning the error code directly, and the caller is expecting an
    negative error code

    Signed-off-by: Tong Zhang
    Cc:
    Link: https://lore.kernel.org/r/20200824224541.1260307-1-ztong0001@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Tong Zhang
     
  • commit eed8f88b109aa927fbf0d0c80ff9f8d00444ca7f upstream.

    This reverts commit 61eee4a7fc40 ("ALSA: hda: Add support for Loongson
    7A1000 controller") to fix the following error on the Loongson LS7A
    platform:

    rcu: INFO: rcu_preempt self-detected stall on CPU

    NMI backtrace for cpu 0
    CPU: 0 PID: 68 Comm: kworker/0:2 Not tainted 5.8.0+ #3
    Hardware name: , BIOS
    Workqueue: events azx_probe_work [snd_hda_intel]

    Call Trace:
    [] show_stack+0x9c/0x130
    [] dump_stack+0xb0/0xf0
    [] nmi_cpu_backtrace+0x134/0x140
    [] nmi_trigger_cpumask_backtrace+0x190/0x200
    [] rcu_dump_cpu_stacks+0x12c/0x190
    [] rcu_sched_clock_irq+0xa2c/0xfc8
    [] update_process_times+0x2c/0xb8
    [] tick_sched_timer+0x40/0xb8
    [] __hrtimer_run_queues+0x118/0x1d0
    [] hrtimer_interrupt+0x12c/0x2d8
    [] c0_compare_interrupt+0x74/0xa0
    [] __handle_irq_event_percpu+0xa8/0x198
    [] handle_irq_event_percpu+0x30/0x90
    [] handle_percpu_irq+0x88/0xb8
    [] generic_handle_irq+0x44/0x60
    [] do_IRQ+0x18/0x28
    [] plat_irq_dispatch+0x64/0x100
    [] handle_int+0x140/0x14c
    [] irq_exit+0xf8/0x100

    Because AZX_DRIVER_GENERIC can not work well for Loongson LS7A HDA
    controller, it needs some workarounds which are not merged into the
    upstream kernel at this time, so it should revert this patch now.

    Fixes: 61eee4a7fc40 ("ALSA: hda: Add support for Loongson 7A1000 controller")
    Cc: # 5.9-rc1+
    Signed-off-by: Tiezhu Yang
    Link: https://lore.kernel.org/r/1598348388-2518-1-git-send-email-yangtiezhu@loongson.cn
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Tiezhu Yang
     

03 Sep, 2020

6 commits

  • [ Upstream commit 23dc958689449be85e39351a8c809c3d344b155b ]

    The very quiet and distorted headphone output bug that afflicted my
    Samsung Notebook 9 is appearing in many other Samsung laptops. Expose
    the quirk which fixed my laptop as a model so other users can try it.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
    Signed-off-by: Mike Pozulp
    Link: https://lore.kernel.org/r/20200817043219.458889-1-pozulp.kernel@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Mike Pozulp
     
  • [ Upstream commit 61eee4a7fc406f94e441778c3cecbbed30373c89 ]

    Add the new PCI ID 0x0014 0x7a07 to support Loongson 7A1000 controller.

    Signed-off-by: Kaige Li
    Link: https://lore.kernel.org/r/1594954292-1703-2-git-send-email-likaige@loongson.cn
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Kaige Li
     
  • [ Upstream commit d96f27c80b65437a7b572647ecb4717ec9a50c98 ]

    There's another HP desktop has buggy BIOS which flags the Port
    Connectivity bit as no connection.

    Apply force connectivity quirk to enable DP/HDMI audio.

    Signed-off-by: Kai-Heng Feng
    Link: https://lore.kernel.org/r/20200811095336.32396-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Kai-Heng Feng
     
  • [ Upstream commit e2d2fded6bdf3f7bb40718a208140dba8b4ec574 ]

    The jack on Intel NUC 8 Rugged rear panel doesn't work.

    The spec [1] states that the jack supports both headphone and
    microphone, so override a Pin Complex which has both Amp-In and Amp-Out
    to make the jack work.

    Node 0x1b fits the requirement, and user confirmed the jack now works
    with new pin config.

    [1] https://www.intel.com/content/dam/support/us/en/documents/mini-pcs/NUC8CCH_TechProdSpec.pdf
    BugLink: https://bugs.launchpad.net/bugs/1875199

    Signed-off-by: Kai-Heng Feng
    Link: https://lore.kernel.org/r/20200807080514.15293-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Kai-Heng Feng
     
  • [ Upstream commit c7fabbc51352f50cc58242a6dc3b9c1a3599849b ]

    Drop duplicated words in sound/pci/.
    {and, the, at}

    Signed-off-by: Randy Dunlap
    Link: https://lore.kernel.org/r/20200806021926.32418-1-rdunlap@infradead.org
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Randy Dunlap
     
  • [ Upstream commit cd72c317a0a11f64225b9a3f1fe503bb8c7327b5 ]

    HDMI on some platforms doesn't enable audio support because its Port
    Connectivity [31:30] is set to AC_JACK_PORT_NONE:
    Node 0x05 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
    Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
    Amp-Out vals: [0x00 0x00]
    Pincap 0x0b000094: OUT Detect HBR HDMI DP
    Pin Default 0x58560010: [N/A] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Pin-ctls: 0x40: OUT
    Unsolicited: tag=00, enabled=0
    Power states: D0 D3 EPSS
    Power: setting=D0, actual=D0
    Devices: 0
    Connection: 3
    0x02 0x03* 0x04

    For now, use a quirk to force connectivity based on SSID. If there are
    more platforms affected by the same issue, we can eye for a more generic
    solution.

    Signed-off-by: Kai-Heng Feng
    Link: https://lore.kernel.org/r/20200804155836.16252-1-kai.heng.feng@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Kai-Heng Feng
     

26 Aug, 2020

2 commits

  • commit e17f02d0559c174cf1f6435e45134490111eaa37 upstream.

    The Galaxy Book Ion uses the same ALC298 codec as other Samsung laptops
    which have the no headphone sound bug, like my Samsung Notebook. The
    Galaxy Book owner confirmed that this patch fixes the bug.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
    Signed-off-by: Mike Pozulp
    Cc:
    Link: https://lore.kernel.org/r/20200818165446.499821-1-pozulp.kernel@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Mike Pozulp
     
  • commit f70fff83cda63bbf596f99edc131b9daaba07458 upstream.

    The Flex Book uses the same ALC298 codec as other Samsung laptops which
    have the no headphone sound bug, like my Samsung Notebook. The Flex Book
    owner used Early Patching to confirm that this quirk fixes the bug.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
    Signed-off-by: Mike Pozulp
    Cc:
    Link: https://lore.kernel.org/r/20200814045346.645367-1-pozulp.kernel@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Mike Pozulp
     

21 Aug, 2020

1 commit

  • [ Upstream commit 5a25de6df789cc805a9b8ba7ab5deef5067af47e ]

    Freeing chip on error may lead to an Oops at the next time
    the system goes to resume. Fix this by removing all
    snd_echo_free() calls on error.

    Fixes: 47b5d028fdce8 ("ALSA: Echoaudio - Add suspend support #2")
    Signed-off-by: Dinghao Liu
    Link: https://lore.kernel.org/r/20200813074632.17022-1-dinghao.liu@zju.edu.cn
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Dinghao Liu
     

19 Aug, 2020

1 commit

  • commit 386a6539992b82fe9ac4f9dc3f548956fd894d8c upstream.

    After installing the Ubuntu Linux, the micmute led status is not
    correct. Users expect that the led is on if the capture is disabled,
    but with the current kernel, the led is off with the capture disabled.

    We tried the old linux kernel like linux-4.15, there is no this issue.
    It looks like we introduced this issue when switching to the led_cdev.

    Cc:
    Signed-off-by: Hui Wang
    Link: https://lore.kernel.org/r/20200810021659.7429-1-hui.wang@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     

11 Aug, 2020

6 commits

  • [ Upstream commit 7fcd9bb5acd01250bcae1ecc0cb8b8d4bb5b7e63 ]

    When the ASoC card registration fails and the codec component driver
    never probes, the codec device is not initialized and therefore
    memory for codec->wcaps is not allocated. This results in a NULL pointer
    dereference when the codec driver suspend callback is invoked during
    system suspend. Fix this by returning without performing any actions
    during codec suspend/resume if the card was not registered successfully.

    Reviewed-by: Pierre-Louis Bossart
    Signed-off-by: Ranjani Sridharan
    Link: https://lore.kernel.org/r/20200728231011.1454066-1-ranjani.sridharan@linux.intel.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Ranjani Sridharan
     
  • commit 7fe3530427e52dd53cd7366914864e29215180a4 upstream.

    The ca0113 command had the wrong group_id, 0x48 when it should've been
    0x30. The front microphone selection should now work.

    Signed-off-by: Connor McAdams
    Cc:
    Link: https://lore.kernel.org/r/20200803002928.8638-3-conmanx360@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Connor McAdams
     
  • commit a00dc409de455b64e6cb2f6d40cdb8237cdb2e83 upstream.

    When the ZxR headphone gain control was added, the ca0132_switch_get
    function was not updated, which meant that the changes to the control
    state were not saved when entering/exiting alsamixer.

    Signed-off-by: Connor McAdams
    Cc:
    Link: https://lore.kernel.org/r/20200803002928.8638-1-conmanx360@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Connor McAdams
     
  • commit cc5edb1bd3f7bfe450f767b12423f6673822427b upstream.

    Add a new quirk ID for the Recon3D, as tested by me.

    Signed-off-by: Connor McAdams
    Cc:
    Link: https://lore.kernel.org/r/20200803002928.8638-2-conmanx360@gmail.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Connor McAdams
     
  • commit f1ec5be17b9aafbc5f573da023850566b43d8e5e upstream.

    There are several Loongson-3 based laptops produced by CZC or Lemote,
    they use alc269/alc662 codecs and need specific pin-tables, this patch
    add their pin-tables.

    Signed-off-by: Huacai Chen
    Cc:
    Link: https://lore.kernel.org/r/1596360400-32425-1-git-send-email-chenhc@lemote.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Huacai Chen
     
  • commit 07c9983b567d0ef33aefc063299de95a987e12a8 upstream.

    This reverts commit 9a6418487b56 ("ALSA: hda: call runtime_allow()
    for all hda controllers").

    The reverted patch already introduced some regressions on some
    machines:
    - on gemini-lake machines, the error of "azx_get_response timeout"
    happens in the hda driver.
    - on the machines with alc662 codec, the audio jack detection doesn't
    work anymore.

    Fixes: 9a6418487b56 ("ALSA: hda: call runtime_allow() for all hda controllers")
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208511
    Cc:
    Signed-off-by: Hui Wang
    Link: https://lore.kernel.org/r/20200803064638.6139-1-hui.wang@canonical.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     

05 Aug, 2020

5 commits

  • commit c2c3657f0aedb8736a0fb7b2b1985adfb86e7802 upstream.

    It's been reported that, when neither nouveau nor Nvidia graphics
    driver is used, the screen starts flickering. And, after comparing
    between the working case (stable 4.4.x) and the broken case, it turned
    out that the problem comes from the audio component binding. The
    Nvidia and AMD audio binding code clears the bus->keep_power flag
    whenever snd_hdac_acomp_init() succeeds. But this doesn't mean that
    the component is actually bound, but it merely indicates that it's
    ready for binding. So, when both nouveau and Nvidia are blacklisted
    or not ready, the driver keeps running without the audio component but
    also with bus->keep_power = false. This made the driver runtime PM
    kicked in and powering down when unused, which results in flickering
    in the graphics side, as it seems.

    For fixing the bug, this patch moves the bus->keep_power flag change
    into generic_acomp_notifier_set() that is the function called from the
    master_bind callback of component ops; i.e. it's guaranteed that the
    binding succeeded.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208609
    Fixes: 5a858e79c911 ("ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs")
    Cc:
    Link: https://lore.kernel.org/r/20200728082033.23933-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 5649625344fe1f4695eace7c37d011e317bf66d5 upstream.

    HP NB right speaker had no sound output.
    This platform was connected to I2S Amp for speaker out.(None Realtek I2S Amp IC)
    EC need to check codec GPIO1 pin to initial I2S Amp.

    Signed-off-by: Kailang Yang
    Cc:
    Link: https://lore.kernel.org/r/01285f623ac7447187482fb4a8ecaa7c@realtek.com
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Kailang Yang
     
  • commit 6fa38ef1534e7e9320aa15e329eb1404ab2f70ac upstream.

    Intel requires to enable power saving mode for intel reference board (alc256)

    Signed-off-by: PeiSen Hou
    Cc:
    Link: https://lore.kernel.org/r/20200727115647.10967-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    PeiSen Hou
     
  • commit 293a92c1d9913248b9987b68f3a5d6d2f0aae62b upstream.

    This patch fixes a small typo I accidently submitted with the initial patch. The board should be named GA401 not G401.

    Fixes: ff53664daff2 ("ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289")
    Signed-off-by: Armas Spann
    Cc:
    Link: https://lore.kernel.org/r/20200724140837.302763-1-zappel@retarded.farm
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Armas Spann
     
  • commit 4b43d05a1978a93a19374c6e6b817c9c1ff4ba4b upstream.

    This patch adds support for headset mic to the ASUS ROG Zephyrus
    G15(GA502) notebook series by adding the corresponding
    vendor/pci_device id, as well as adding a new fixup for the used
    realtek ALC289. The fixup stets the correct pin to get the headset mic
    correctly recognized on audio-jack.

    Signed-off-by: Armas Spann
    Cc:
    Link: https://lore.kernel.org/r/20200724140616.298892-1-zappel@retarded.farm
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Armas Spann