20 Nov, 2020

2 commits

  • …t/broonie/sound into for-linus

    ASoC: Fixes for v5.11

    A collection of driver specific fixes, mostly for x86 systems (or CODECs
    used mostly on x86) and all for relatively minor issues, the biggest one
    being fixing S24_LE format on Keem Bay systems.

    Takashi Iwai
     
  • The code change for switching to non-atomic mode brought the
    unexpected mutex deadlock in get_msg(). It converted the spinlock
    with the existing mutex, but there were calls with the already holding
    the mutex. Since the only place that needs the extra lock is the code
    path from snd_mixart_send_msg(), remove the mutex lock in get_msg()
    and apply in the caller side for fixing the mutex deadlock.

    Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops")
    Reported-by: Dan Carpenter
    Cc:
    Link: https://lore.kernel.org/r/20201119121440.18945-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

19 Nov, 2020

2 commits

  • CONFIG_PCI=n leads to a compile warning like:
    sound/pci/hda/patch_ca0132.c:8214:10: warning: no case matching constant switch condition '0'
    due to the missed handling of QUIRK_NONE in ca0132_mmio_init().
    Fix it.

    Fixes: bf2aa9ccc8e5 ("ALSA: hda/ca0132 - Cleanup ca0132_mmio_init function.")
    Reported-by: kernel test robot
    Link: https://lore.kernel.org/r/20201119120404.16833-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • In kabylake_set_bias_level(), enabling mclk may fail if the clock has
    already been enabled by the firmware. Attempts to disable that clock
    later will fail with a warning backtrace.

    mclk already disabled
    WARNING: CPU: 2 PID: 108 at drivers/clk/clk.c:952 clk_core_disable+0x1b6/0x1cf
    ...
    Call Trace:
    clk_disable+0x2d/0x3a
    kabylake_set_bias_level+0x72/0xfd [snd_soc_kbl_rt5663_rt5514_max98927]
    snd_soc_card_set_bias_level+0x2b/0x6f
    snd_soc_dapm_set_bias_level+0xe1/0x209
    dapm_pre_sequence_async+0x63/0x96
    async_run_entry_fn+0x3d/0xd1
    process_one_work+0x2a9/0x526
    ...

    Only disable the clock if it has been enabled.

    Fixes: 15747a802075 ("ASoC: eve: implement set_bias_level function for rt5514")
    Cc: Brent Lu
    Cc: Curtis Malainey
    Signed-off-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20201111205434.207610-1-linux@roeck-us.net
    Signed-off-by: Mark Brown

    Guenter Roeck
     

17 Nov, 2020

6 commits

  • Found one more Logitech device, BCC950 ConferenceCam, which needs
    the same delay here. This makes 3 out of 3 devices I have tried.

    Therefore, add a delay for all Logitech devices as it does not hurt.

    Signed-off-by: Joakim Tjernlund
    Cc: # 4.19.y, 5.4.y
    Link: https://lore.kernel.org/r/20201117122803.24310-1-joakim.tjernlund@infinera.com
    Signed-off-by: Takashi Iwai

    Joakim Tjernlund
     
  • Mark Brown
     
  • During stream start DSP firmware requires LPCS disabled as that moment in
    time is resource heavy. Currently high-clock is selected on start of
    second stream onwards while low-clock is re-selected before stream
    actually leaves RESUME state i.e. PAUSE_STREAM call. Fix this by always
    updating clock before RESUME_STREAM and directly after PAUSE_STREAM.

    Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations")
    Signed-off-by: Cezary Rojewski
    Link: https://lore.kernel.org/r/20201116133332.8530-3-cezary.rojewski@intel.com
    Signed-off-by: Mark Brown

    Cezary Rojewski
     
  • Playing with very low period sizes may lead to timeouts when awaiting
    RESET_STREAM reply for offload streams. This is caused by NOTIFY_POSITION
    appearing in the middle of trigger(stop).

    Stream is unprepared during trigger(stop) where PAUSE_STREAM IPC gets
    invoked. However, all data that is already mixed in DSP firmware's mixer
    stream will still be played regardless of the pause. For offload streams,
    this means possibility for another NOTIFY_POSITION to process. Keep these
    notifications in check by only handling them when stream is in prepared
    state.

    Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations")
    Signed-off-by: Cezary Rojewski
    Link: https://lore.kernel.org/r/20201116133332.8530-2-cezary.rojewski@intel.com
    Signed-off-by: Mark Brown

    Cezary Rojewski
     
  • lpass_pcm_data is not freed in error paths. Free it in
    error paths to avoid memory leak.

    Fixes: 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage")
    Signed-off-by: Pavel Machek
    Signed-off-by: V Sujith Kumar Reddy
    Signed-off-by: Srinivasa Rao Mandadapu
    Link: https://lore.kernel.org/r/1605416210-14530-1-git-send-email-srivasam@codeaurora.org
    Signed-off-by: Mark Brown

    Srinivasa Rao Mandadapu
     
  • S24_LE is 24 bit audio in 32 bit container configuration
    Fixing the configuration to match the data arrangement of
    this audio format.

    Fixes: c5477e966728 ("ASoC: Intel: Add KeemBay platform driver")

    Signed-off-by: Michael Sit Wei Hong
    Reviewed-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20201116061905.32431-2-michael.wei.hong.sit@intel.com
    Signed-off-by: Mark Brown

    Michael Sit Wei Hong
     

16 Nov, 2020

2 commits


14 Nov, 2020

1 commit

  • The spin_lock/unlock_irq() functions cannot be nested. The problem is
    that presumably we would want the IRQs to be re-enabled on the second
    call the spin_unlock_irq() but instead it will be enabled at the first
    call so IRQs will be enabled earlier than expected.

    In this situation the copy_resp_to_buf() function is only called from
    one function and it is called with IRQs disabled. We can just use
    the regular spin_lock/unlock() functions.

    Fixes: 555e8a8f7f14 ("ALSA: fireworks: Add command/response functionality into hwdep interface")
    Signed-off-by: Dan Carpenter
    Acked-by: Takashi Sakamoto
    Cc:
    Link: https://lore.kernel.org/r/20201113101241.GB168908@mwanda
    Signed-off-by: Takashi Iwai

    Dan Carpenter
     

13 Nov, 2020

4 commits

  • To meet the most platform, the detection time should be increased to
    avoid that the flushing DAC data fails.

    Signed-off-by: Shuming Fan
    Link: https://lore.kernel.org/r/20201113092125.19206-1-shumingf@realtek.com
    Signed-off-by: Mark Brown

    Shuming Fan
     
  • When processing request to add/replace user-defined element set, check
    of given element identifier and decision of numeric identifier is done
    in "__snd_ctl_add_replace()" helper function. When the result of check
    is wrong, the helper function returns error code. The error code shall
    be returned to userspace application.

    Current implementation includes bug to return zero to userspace application
    regardless of the result. This commit fixes the bug.

    Cc:
    Fixes: e1a7bfe38079 ("ALSA: control: Fix race between adding and removing a user element")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20201113092043.16148-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • System boot or warm boot with plugged headset.
    If it turn on power save mode, Headset Mic will lose.
    This patch will solve this issue.

    Signed-off-by: Kailang Yang
    Cc:
    Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com
    Signed-off-by: Takashi Iwai

    Kailang Yang
     
  • HP Pavilion x360 Convertible machine, it supported mute led.
    GPIO4 high will turn on led.
    The patch will enable control led via GPIO4 pin.

    Signed-off-by: Kailang Yang
    Cc:
    Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com
    Signed-off-by: Takashi Iwai

    Kailang Yang
     

11 Nov, 2020

1 commit


07 Nov, 2020

1 commit


06 Nov, 2020

2 commits


05 Nov, 2020

2 commits


04 Nov, 2020

3 commits


03 Nov, 2020

1 commit


29 Oct, 2020

4 commits

  • Disable MI2S bit clock from PAUSE/STOP/SUSPEND usecase instead of
    shutdown time. Acheive this by invoking clk_disable API from
    cpu daiops trigger instead of cpu daiops shutdown.
    Change non-atomic API "clk_prepare_enable" to atomic API
    "clk_enable" in trigger, as trigger is being called from atomic context.

    Fixes: 7e6799d8f87d ("ASoC: qcom: lpass-cpu: Enable MI2S BCLK and LRCLK together")

    Signed-off-by: V Sujith Kumar Reddy
    Signed-off-by: Srinivasa Rao Mandadapu
    Link: https://lore.kernel.org/r/1603098363-9251-1-git-send-email-srivasam@codeaurora.org
    Signed-off-by: Mark Brown

    V Sujith Kumar Reddy
     
  • Update SC7180 lpass_variant structure with proper I2S bitwidth
    field bit positions, as bitwidth denotes 0 to 1 bits,
    but previously used only 0 bit.

    Signed-off-by: V Sujith Kumar Reddy
    Signed-off-by: Srinivasa Rao Mandadapu
    Link: https://lore.kernel.org/r/1603798474-4897-1-git-send-email-srivasam@codeaurora.org
    Signed-off-by: Mark Brown

    V Sujith Kumar Reddy
     
  • Linux 5.10-rc1

    Mark Brown
     
  • digital gain range is -84dB min to 40dB max, however this was not
    correctly specified in the range.

    Fix this by with correct range!

    Fixes: 8c4f021d806a ("ASoC: wcd9335: add basic controls")
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20201028154340.17090-2-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     

28 Oct, 2020

5 commits

  • digital gain range is -84dB min to 40dB max, however this was not
    correctly specified in the range.

    Fix this by with correct range!

    Fixes: 1cde8b822332 ("ASoC: wcd934x: add basic controls")
    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20201028154340.17090-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     
  • The broken jack detection should be fixed by commit a6e7d0a4bdb0 ("ALSA:
    hda: fix jack detection with Realtek codecs when in D3"), let's try
    enabling runtime PM by default again.

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

    Kai-Heng Feng
     
  • Both pm_runtime_force_suspend() and pm_runtime_force_resume() have
    some implicit checks, so it can make code flow more straightforward if
    we separate runtime and system suspend callbacks.

    High Definition Audio Specification, 4.5.9.3 Codec Wake From System S3
    states that codec can wake the system up from S3 if WAKEEN is toggled.
    Since HDA controller has different wakeup settings for runtime and
    system susend, we also need to explicitly disable direct-complete which
    can be enabled automatically by PCI core. In addition to that, avoid
    waking up codec if runtime resume is for system suspend, to not break
    direct-complete for codecs.

    While at it, also remove AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP, as the
    original bug commit a6630529aecb ("ALSA: hda: Workaround for spurious
    wakeups on some Intel platforms") solves doesn't happen with this
    patch.

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

    Kai-Heng Feng
     
  • Upon system resume, hda_codec_pm_resume() uses hda_codec_force_resume()
    to resume the codec. However, pm_runtime_force_resume() won't really
    resume the codec because of pm_runtime_need_not_resume() check.

    Hence, hda_codec_force_resume() schedules a jackpoll work, which is to
    really power up the codec.

    Instead of doing that, we can use direct-complete to make the PM flow
    more straightforward, and keep codec always suspended through system PM
    flow if conditions are met.

    On system suspend, PM core will decide what to do based on
    hda_codec_pm_prepare():
    - If codec is not runtime-suspended, PM core will suspend and resume the
    device as normal.
    - If codec is runtime-suspended, PM core will try to keep it suspended.
    If it's still suspended after system resume, we use
    hda_codec_pm_complete() to resume codec if it's needed.

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

    Kai-Heng Feng
     
  • System boot with plugged headset. It will not detect headset Mic.
    It will happen on cold boot restart resume state.
    Quirk by SSID change to quirk by pin verb.

    Fixes: 13468bfa8c58 ("ALSA: hda/realtek - set mic to auto detect on a HP AIO machine")
    Signed-off-by: Kailang Yang
    Cc:
    Link: https://lore.kernel.org/r/f42ae1ede1cf47029ae2bef1a42caf03@realtek.com
    Signed-off-by: Takashi Iwai

    Kailang Yang
     

27 Oct, 2020

1 commit

  • The Zoom UAC-2 USB audio interface provides an async playback endpoint
    ("1 OUT (ASYNC)") and capture endpoint ("2 IN (ASYNC)"), both with
    2-channel S32_LE in 44.1, 48, 88.2, 96, 176.4, or 192
    kilosamples/s. The device provides explicit feedback to adjust the
    host's playback rate, but the feedback appears unstable and biased
    relative to the device's capture rate.

    "alsaloop -t 1000" experiences playback underruns and tries to
    resample the captured audio to match the varying playback
    rate. Forcing the kernel to use implicit feedback appears to
    produce more stable results. This causes the host to transmit one
    playback sample for each capture sample received. (Zoom North America
    has been notified of this change.)

    Signed-off-by: Keith Winstein
    Tested-by: Keith Winstein
    Cc:
    BugLink: https://lore.kernel.org/r/20201027071841.GA164525@trolley.csail.mit.edu
    Signed-off-by: Takashi Iwai

    Keith Winstein
     

26 Oct, 2020

1 commit

  • Kernel-doc markups should use this format:
    identifier - description

    There is a common comment marked, instead, with kernel-doc
    notation.

    Some identifiers have different names between their prototypes
    and the kernel-doc markup.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Mark Brown
    Link: https://lore.kernel.org/r/535182d6f55d7a7de293dda9676df68f5f60afc6.1603469755.git.mchehab+huawei@kernel.org
    Signed-off-by: Takashi Iwai

    Mauro Carvalho Chehab
     

25 Oct, 2020

1 commit

  • Pull ARM SoC platform updates from Olof Johansson:
    "SoC changes, a substantial part of this is cleanup of some of the
    older platforms that used to have a bunch of board files.

    In particular:

    - Remove non-DT i.MX platforms that haven't seen activity in years,
    it's time to remove them.

    - A bunch of cleanup and removal of platform data for TI/OMAP
    platforms, moving over to genpd for power/reset control (yay!)

    - Major cleanup of Samsung S3C24xx and S3C64xx platforms, moving them
    closer to multiplatform support (not quite there yet, but getting
    close).

    There are a few other changes too, smaller fixlets, etc. For new
    platform support, the primary ones are:

    - New SoC: Hisilicon SD5203, ARM926EJ-S platform.

    - Cpufreq support for i.MX7ULP"

    * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (121 commits)
    ARM: mstar: Select MStar intc
    ARM: stm32: Replace HTTP links with HTTPS ones
    ARM: debug: add UART early console support for SD5203
    ARM: hisi: add support for SD5203 SoC
    ARM: omap3: enable off mode automatically
    clk: imx: imx35: Remove mx35_clocks_init()
    clk: imx: imx31: Remove mx31_clocks_init()
    clk: imx: imx27: Remove mx27_clocks_init()
    ARM: imx: Remove unused definitions
    ARM: imx35: Retrieve the IIM base address from devicetree
    ARM: imx3: Retrieve the AVIC base address from devicetree
    ARM: imx3: Retrieve the CCM base address from devicetree
    ARM: imx31: Retrieve the IIM base address from devicetree
    ARM: imx27: Retrieve the CCM base address from devicetree
    ARM: imx27: Retrieve the SYSCTRL base address from devicetree
    ARM: s3c64xx: bring back notes from removed debug-macro.S
    ARM: s3c24xx: fix Wunused-variable warning on !MMU
    ARM: samsung: fix PM debug build with DEBUG_LL but !MMU
    MAINTAINERS: mark linux-samsung-soc list non-moderated
    ARM: imx: Remove remnant board file support pieces
    ...

    Linus Torvalds
     

24 Oct, 2020

1 commit