Commit graph

8765 commits

Author SHA1 Message Date
Dinghao Liu
5a25de6df7 ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
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: 47b5d028fd ("ALSA: Echoaudio - Add suspend support #2")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20200813074632.17022-1-dinghao.liu@zju.edu.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-13 11:21:05 +02:00
Kai-Heng Feng
d96f27c80b ALSA: hda/hdmi: Use force connectivity quirk on another HP desktop
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 <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200811095336.32396-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-12 17:46:18 +02:00
Takashi Iwai
e5b1d9776a ALSA: hda/realtek - Fix unused variable warning
The previous fix forgot to remove the unused variable that triggers a
compile warning now:
  sound/pci/hda/patch_realtek.c: In function 'alc285_fixup_hp_gpio_led':
  sound/pci/hda/patch_realtek.c:4163:19: warning: unused variable 'spec' [-Wunused-variable]

Fix it.

Fixes: 404690649e ("ALSA: hda - reverse the setting value in the micmute_led_set")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20200812070256.32145-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-12 09:03:45 +02:00
Hui Wang
404690649e ALSA: hda - reverse the setting value in the micmute_led_set
Before the micmute_led_set() is introduced, the function of
alc_gpio_micmute_update() will set the gpio value with the
!micmute_led.led_value, and the machines have the correct micmute led
status. After the micmute_led_set() is introduced, it sets the gpio
value with !!micmute_led.led_value, so the led status is not correct
anymore, we need to set micmute_led_polarity = 1 to workaround it.

Now we fix the micmute_led_set() and remove micmute_led_polarity = 1.

Fixes: 87dc36482c ("ALSA: hda/realtek - Add LED class support for micmute LED")
Reported-and-suggested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200811122430.6546-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-11 14:47:24 +02:00
Takashi Iwai
85cb905d3c ALSA: echoaduio: Drop superfluous volatile modifier
The dsp_registers field of struct echoaduio has the volatile modifier,
but it's basically superfluous; the field is accessed only for the
base pointer of readl() and writel(), hence marking with __iomem alone
should suffice.  OTOH, having the volatile prefix causes a compile
warning like:
  sound/pci/echoaudio/echoaudio.c:1878:14: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]

So it's better to drop this superfluous modifier.

Link: https://lore.kernel.org/r/20200803143958.24324-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-11 14:21:49 +02:00
Hui Wang
386a653999 ALSA: hda - fix the micmute led status for Lenovo ThinkCentre AIO
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: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200810021659.7429-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-10 08:44:49 +02:00
Kai-Heng Feng
e2d2fded6b ALSA: hda/realtek: Fix pin default on Intel NUC 8 Rugged
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 <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200807080514.15293-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-07 10:09:54 +02:00
Randy Dunlap
c7fabbc513 ALSA: pci: delete repeated words in comments
Drop duplicated words in sound/pci/.
{and, the, at}

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20200806021926.32418-1-rdunlap@infradead.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-06 09:30:02 +02:00
Mohan Kumar
ed4d0a4aaf ALSA: hda/tegra: Add 100us dma stop delay
Tegra HDA has audio data buffer for upto tens of frames, this buffer
can help to avoid underflow. HW will keep issuing new data fetch
request when buffers are not full and current BDL is not done. When SW
disable DMA RUN bit for a stream, HW can't cancel the already issued data
fetch request and hence it can't stop DMA. HW has to wait for all issued
data fetch request get data returned before it stops DMA.

This HW behavior is not in sync with HDA spec which says DMA RUN bit
should be cleared within 1 audio frame. For Tegra, DMA RUN bit was
active for more than one audio frame, due to this the timeout in
snd_hdac_stream_sync function is not helping. When Stream reset set
and clear happens during DMA RUN bit active state it results in Memory
Decode error.

Unfortunately, there is no way to detect when these data accesses have
completed, but testing has shown that a 100us delay between Stream reset
set and clear operation for Tegra avoids the memory decode error.
Therefore, adding a 100us dma stop delay.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Link: https://lore.kernel.org/r/20200805095221.5476-4-mkumard@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-05 12:28:14 +02:00
Mohan Kumar
6c17e9dd5c ASoC: hda/tegra: Set buffer alignment to 128 bytes
Set chip->align_buffer_size to 1 for Tegra platforms to make the buffer
alignment to be multiple of 128 bytes. This fix is applied as gstreamer
alsasink gets stuck with the default buffer-time and latency-time
parameters with 4 byte buffer alignment.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Link: https://lore.kernel.org/r/20200805095221.5476-2-mkumard@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-05 12:27:35 +02:00
Kai-Heng Feng
cd72c317a0 ALSA: hda/hdmi: Add quirk to force connectivity
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 <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200804155836.16252-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-04 20:54:36 +02:00
Takashi Iwai
103f528d3b ASoC: Updates for v5.9
The biggest changes here one again come from Mormioto-san who has
 continued his dilligent work cleaning up long standing issues in the
 APIs, it's particularly nice to see the transition from digital_mute()
 to mute_stream() finally completed. There's also been a lot of work on
 the x86 code again, this time a big focus has been on cleaning up some
 issues identified by various static tests, and on the Freescale systems.
 Otherwise the biggest thing has been a lot of driver additions:
 
  - Convert users of digital_mute() to mute_stream().
  - Simplify I/O helper functions.
  - Add a helper for getting the RTD from a substream.
  - Many, many fixes and cleanups to the x86 code.
  - New drivers for Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim
    MAX98360A and MAX98373 Soundwire, several Mediatek boards, nVidia
    Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards (some
    of the first phones I worked on!) and TI J721e EVM.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl8n96MTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0FApB/sFAbX/RWXiH5fBRQnGsfvLznORx9pA
 90xR+BgpybawRgTk4Bi87sY5lBI44S4OwUqqI58D+/GD7uchgY2Z2m+4flF9GbDU
 VTOvChqL0ZpDh2Crr2+BkSlVjZsA3h0e86W/0qoq3/q4dgb7ZfcLJ2w7A+UDq+kP
 tKKqi3mTxXuM78N3Vp8/IobIRpo/fi3Oy2aB+WOiAUD6rV88yzx+QgNkvzwvTcpm
 y8ejr2zYPYLHLshUh2S7HJaGyX7NjggGVaUolJtfGT+ArAP6j3JIxikC3Mr9TImd
 qaX2BsHNE1XARK8KQXA5qTP7++RlewSSxblpoVRFZwV70On9/L5W4GPp
 =OO0s
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v5.9

The biggest changes here one again come from Mormioto-san who has
continued his dilligent work cleaning up long standing issues in the
APIs, it's particularly nice to see the transition from digital_mute()
to mute_stream() finally completed. There's also been a lot of work on
the x86 code again, this time a big focus has been on cleaning up some
issues identified by various static tests, and on the Freescale systems.
Otherwise the biggest thing has been a lot of driver additions:

 - Convert users of digital_mute() to mute_stream().
 - Simplify I/O helper functions.
 - Add a helper for getting the RTD from a substream.
 - Many, many fixes and cleanups to the x86 code.
 - New drivers for Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim
   MAX98360A and MAX98373 Soundwire, several Mediatek boards, nVidia
   Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards (some
   of the first phones I worked on!) and TI J721e EVM.
2020-08-03 14:41:43 +02:00
Hui Wang
07c9983b56 Revert "ALSA: hda: call runtime_allow() for all hda controllers"
This reverts commit 9a6418487b ("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: 9a6418487b ("ALSA: hda: call runtime_allow() for all hda controllers")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208511
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200803064638.6139-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 09:28:41 +02:00
Connor McAdams
7fe3530427 ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
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 <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-3-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:12:17 +02:00
Connor McAdams
cc5edb1bd3 ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
Add a new quirk ID for the Recon3D, as tested by me.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:12:02 +02:00
Connor McAdams
a00dc409de ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
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 <conmanx360@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200803002928.8638-1-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03 08:11:40 +02:00
Takashi Iwai
3b5d1afd1f Merge branch 'for-next' into for-linus 2020-08-03 08:10:08 +02:00
Huacai Chen
f1ec5be17b ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
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 <chenhc@lemote.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1596360400-32425-1-git-send-email-chenhc@lemote.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-02 11:49:07 +02:00
Mark Brown
84569f329f
Merge remote-tracking branch 'asoc/for-5.9' into asoc-next 2020-07-31 19:54:03 +01:00
Kailang Yang
5649625344 ALSA: hda/realtek - Fixed HP right speaker no sound
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 <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/01285f623ac7447187482fb4a8ecaa7c@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-30 10:15:51 +02:00
Ranjani Sridharan
7fcd9bb5ac ALSA: hda: fix NULL pointer dereference during suspend
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 <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200728231011.1454066-1-ranjani.sridharan@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-29 09:54:49 +02:00
Takashi Iwai
c2c3657f0a ALSA: hda/hdmi: Fix keep_power assignment for non-component devices
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: 5a858e79c9 ("ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200728082033.23933-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-28 10:23:35 +02:00
Takashi Iwai
a6630529ae ALSA: hda: Workaround for spurious wakeups on some Intel platforms
We've received a regression report on Intel HD-audio controller that
wakes up immediately after S3 suspend.  The bisection leads to the
commit c4c8dd6ef8 ("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: c4c8dd6ef8 ("ALSA: hda: Skip controller resume if not needed")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208649
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200727164443.4233-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-27 18:45:38 +02:00
PeiSen Hou
6fa38ef153 ALSA: hda/realtek: Fix add a "ultra_low_power" function for intel reference board (alc256)
Intel requires to enable power saving mode for intel reference board (alc256)

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200727115647.10967-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-27 13:58:04 +02:00
Armas Spann
293a92c1d9 ALSA: hda/realtek: typo_fix: enable headset mic of ASUS ROG Zephyrus G14(GA401) series with ALC289
This patch fixes a small typo I accidently submitted with the initial patch. The board should be named GA401 not G401.

Fixes: ff53664daf ("ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289")
Signed-off-by: Armas Spann <zappel@retarded.farm>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200724140837.302763-1-zappel@retarded.farm
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-24 18:25:22 +02:00
Armas Spann
4b43d05a19 ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G15(GA502) series with ALC289
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 <zappel@retarded.farm>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200724140616.298892-1-zappel@retarded.farm
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-24 18:21:31 +02:00
Linus Torvalds
8c26c87b05 sound fixes for 5.8-rc7
This PR became fairly large, containing mostly the collection of
 ASoC fixes that slipped from the previous request, so I sent now
 a bit earlier than usual.  But all changes look small and mostly
 device-specific, hence nothing to worry too much.
 
 Majority of changes are for x86 based platforms and their CODEC
 drivers, in order to address some issues hit by their recent tests
 and fuzzing.  The rest are other ASoC device-specific fixes (imx,
 qcom, wm8974, amd, rockchip) as well as a trivial fix for a kernel
 WARNING hit by syzkaller.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAl8WqvQOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8KEA/+MZ+3jkFFinrq+mPPPZOJdMe10XxT1moZrjie
 H+cA6623iVhnKMB9JKMSncroSpgw7OaFlYP1tGfsQkD32rglubUhAqAs7Up3ve9O
 tzVLqyaxwNmy6I38n7g2TUlEIvJyRCiC2pR97XrtqiAmsRDheYBsn8lEN2Ie6eUF
 uAftr6DHJ5lHeYMWFBwN1fjbg4vMZGAFEtK4czme05b0n2gHo4AnXGfpnxYwYhfN
 5WRQm12rtjDsWPC9Rk32auZBH9qnHeGALRCYWlRje4XfbaFnSgbID9/NWNodXjR7
 m92Tw5bEV9SQx+0kNd3+ibGp0RLrgfMitp3hlv2as5GHTlQi2nfLWnWmWUzWFflR
 TKbcpwOANwncMx/KrfEkcqEt0cozMRL3MgkSaXvbarv8ZAyzJGYYIvNXLpA+AHLu
 ryj02Cc7wyTO5Axv7fqF9yNM53mfu6TEPkdtTGOjszTkkf2OknZYjiB4ci47elZm
 3db303JZVmW09b3qNcrNJ273LWxIRaGbFOe1KExfHB1lsBnlufNSVY3+spDl35Cu
 u5w96oCF6KO/j2f3iKUdMT88XfRxsheN9GnU7g3iso8Ewdk7szzhfE8Ynlz+Zyca
 74fyNbowjBrU/FZzY4VopvqQqfNG9mYazQEH+EIBSLUIoGXaKSz+Xnrfz7BgZvCu
 TEb1sB4=
 =iAZG
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into master

Pull sound fixes from Takashi Iwai:
 "This became fairly large, containing mostly the collection of ASoC
  fixes that slipped from the previous request, so I sent now a bit
  earlier than usual. But all changes look small and mostly
  device-specific, hence nothing to worry too much.

  Majority of changes are for x86 based platforms and their CODEC
  drivers, in order to address some issues hit by their recent tests and
  fuzzing. The rest are other ASoC device-specific fixes (imx, qcom,
  wm8974, amd, rockchip) as well as a trivial fix for a kernel WARNING
  hit by syzkaller"

* tag 'sound-5.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits)
  ALSA: hda/realtek: Fixed ALC298 sound bug by adding quirk for Samsung Notebook Pen S
  ALSA: info: Drop WARN_ON() from buffer NULL sanity check
  ASoC: rt5682: Report the button event in the headset type only
  ASoC: Intel: bytcht_es8316: Add missed put_device()
  ASoC: rt5682: Enable Vref2 under using PLL2
  ASoC: rt286: fix unexpected interrupt happens
  ASoC: wm8974: remove unsupported clock mode
  ASoC: wm8974: fix Boost Mixer Aux Switch
  ASoC: SOF: core: fix null-ptr-deref bug during device removal
  ASoc: codecs: max98373: remove Idle_bias_on to let codec suspend
  ASoC: codecs: max98373: Removed superfluous volume control from chip default
  ASoC: topology: fix tlvs in error handling for widget_dmixer
  ASoC: topology: fix kernel oops on route addition error
  ASoC: SOF: imx: add min/max channels for SAI/ESAI on i.MX8/i.MX8M
  ASoC: Intel: bdw-rt5677: fix non BE conversion
  ASoC: soc-dai: set dai_link dpcm_ flags with a helper
  MAINTAINERS: Add Shengjiu to reviewer list of sound/soc/fsl
  ASoC: core: Remove only the registered component in devm functions
  MAINTAINERS: Change Maintainer for some at91 drivers
  ASoC: dt-bindings: simple-card: Fix 'make dt_binding_check' warnings
  ...
2020-07-21 08:06:45 -07:00
Takashi Iwai
9ab0cb309e ALSA: Replace the word "slave" in vmaster API
Follow the recent inclusive terminology guidelines and replace the
word "slave" in vmaster API.  I chose the word "follower" at this time
since it seems fitting for the purpose.

Note that the word "master" is kept in API, since it refers rather to
audio master volume control.

Also, while we're at it, a typo in comments is corrected, too.

Link: https://lore.kernel.org/r/20200717154517.27599-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-20 10:10:47 +02:00
Randy Dunlap
6779ec13ca ALSA: asihpi: delete duplicated word
Delete the doubled word "of" in a comment.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20200719180848.22572-1-rdunlap@infradead.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-19 20:50:47 +02:00
Joonho Wohn
568e4e8212 ALSA: hda/realtek: Fixed ALC298 sound bug by adding quirk for Samsung Notebook Pen S
Fixed no headphone sound bug on laptop Samsung Notebook Pen S
(950SBE-951SBE), by using existing patch in Linus' tree, commit
14425f1f52 (ALSA: hda/realtek: Add quirk for Samsung Notebook).
This laptop uses the same ALC298 but different subsystem id 0x144dc812.
I added SND_PCI_QUIRK at sound/pci/hda/patch_realtek.c

Signed-off-by: Joonho Wohn <doomsheart@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/CAHcbMh291aWDKiWSZoxXB4-Eru6OYRwGA4AVEdCZeYmVLo5ZxQ@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-18 12:40:31 +02:00
Linus Torvalds
a238ac2d6a sound fixes for 5.8-rc6
No surprise here, just a few device-specific small fixes: two fixes
 for USB LINE6 and one for USB-audio drivers wrt syzkaller fuzzer
 issues, while the rest are all HD-audio Realtek quirks.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAl8RSakOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+x2Q/+KKbAvaUuwlx1BK6xXaelPBonjFezm++P6AU7
 Bus02t0bpDPzoCaFH159392wOzmdulV4JZUHiJqJSydQfWdYl4WzpPVDAszsILWB
 Y8c+11qbOOOuxegt6G1VIeGzxujb1qe4KS/qJ9k0JCLLPJoyC6ro8pKKV72e8ANM
 hjH4ooovgOUXGjSsKo4NxX4WAdrQ/7Pkrp6GcGIYgpdwatSM5A2sfL+NNjmiu2JP
 tkHLSUK5VcaooQGkhwmlENRQjR7MjdHNVdtFQ7P3yzhMk6nHyzmYstV8aCNACgHB
 f1CDUwjlTgFJAdGuXuHoObTmo4lDcv5ya7JvE8yJHWhWyEv2BUWABjGJT3O1taiR
 SMmPbB8GLYCtgzm/9X5Exy5mpilLbjLqNcnbuvc4Z21ys7dxn1m4JkHlvt/DQiWN
 O7OUysQ2qx3Qtt6PHKBQvbDQG5/NzjVYRwWw1Y3QAVNuWcN+PwWBWdT7KJLmrLje
 2KqfGFPB5g7q/6UHuywQw+0xixkUOxJ4wSDvgjW/rwLMB/DAzBPzRw21sA4qnYC4
 VaYZiAxWKjmoE+bsRnsjuvHIKT4eJXyxxtPrMwj2SQ0vvfoIYxdTRlxSQNYWS3og
 t2+xYkO3RkuhFZEbimcU3Ge7o+sKsrv9VmxdTkaIGbdOT1eEqdzY3Z3xjrgK5fw3
 U0QRPHo=
 =cpfK
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into master

Pull sound fixes from Takashi Iwai:
 "No surprise here, just a few device-specific small fixes: two fixes
  for USB LINE6 and one for USB-audio drivers wrt syzkaller fuzzer
  issues, while the rest are all HD-audio Realtek quirks"

* tag 'sound-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - fixup for yet another Intel reference board
  ALSA: hda/realtek - Enable Speaker for ASUS UX563
  ALSA: hda/realtek - Enable Speaker for ASUS UX533 and UX534
  ALSA: hda/realtek: Enable headset mic of Acer TravelMate B311R-31 with ALC256
  ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289
  ALSA: hda/realtek - change to suitable link model for ASUS platform
  ALSA: usb-audio: Fix race against the error recovery URB submission
  ALSA: line6: Sync the pending work cancel at disconnection
  ALSA: line6: Perform sanity check for each URB creation
2020-07-17 08:48:19 -07:00
Kaige Li
61eee4a7fc ALSA: hda: Add support for Loongson 7A1000 controller
Add the new PCI ID 0x0014 0x7a07 to support Loongson 7A1000 controller.

Signed-off-by: Kaige Li <likaige@loongson.cn>
Link: https://lore.kernel.org/r/1594954292-1703-2-git-send-email-likaige@loongson.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-17 10:44:12 +02:00
Kai Vehmanen
95ce82ac3c
ALSA: hda: fix snd_hda_codec_cleanup() documentation
Fix a copy and paste error in snd_hda_codec_cleanup()
documentation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200715174551.3730165-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-16 20:59:13 +01:00
Kai Vehmanen
cc1d0cd817
ALSA: hda: export snd_hda_codec_cleanup_for_unbind()
To avoid duplicated code for cleanup, and match the already exported
snd_hda_codec_pcm_new(), also export snd_hda_codec_cleanup_for_unbind().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200715174551.3730165-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-16 20:59:12 +01:00
PeiSen Hou
5734e509d5 ALSA: hda/realtek - fixup for yet another Intel reference board
Add headset_jack for the intel reference board support with
10ec:1230.

Signed-off-by: PeiSen Hou <pshou@realtek.com.tw>
Link: https://lore.kernel.org/r/20200716090134.9811-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-16 11:02:21 +02:00
Kailang Yang
158ae2f5e6 ALSA: hda/realtek - Enable Speaker for ASUS UX563
ASUS UX563 speaker can't output.
Add quirk to link suitable model will enable it.
This model also could enable headset Mic.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/96dee3ab01a04c28a7b44061e88009dd@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-16 09:39:30 +02:00
Kailang Yang
473fbe13fd ALSA: hda/realtek - Enable Speaker for ASUS UX533 and UX534
ASUS UX533 and UX534 speaker still can't output.
End User feedback speaker didn't have output.
Add this COEF value will enable it.

Fixes: 4e05110673 ("ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294")
Cc: <stable@vger.kernel.org>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/80334402a93b48e385f8f4841b59ae09@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-16 09:16:46 +02:00
Takashi Iwai
216416725e ALSA: via82xx: Replace the words whitelist
Follow the recent inclusive terminology guidelines and replace the
words "whitelist" appropriately.

Only comment or variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:57 +02:00
Takashi Iwai
03fa2a7a12 ALSA: nm256: Replace the words blacklist
Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or enum/variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:56 +02:00
Takashi Iwai
7ce78fc845 ALSA: intel8x0: Replace the words white/blacklist
Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Correcting only comments, or error/module messages, no functional
changes.

Link: https://lore.kernel.org/r/20200714172631.25371-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:56 +02:00
Takashi Iwai
6317e5eb20 ALSA: hda: Replace the words white/blacklist
Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or variable renames, no functional changes.

Note that pm_blacklist module option is still kept as was, so that
users can still keep the old option.

Link: https://lore.kernel.org/r/20200714172631.25371-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:55 +02:00
Takashi Iwai
abe092aed2 ALSA: es1968: Replace the words white/blacklist
Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:55 +02:00
Takashi Iwai
ba2b94ee73 ALSA: ctxfi: Replace the word blacklist
Follow the recent inclusive terminology guidelines and replace the
word "blacklist" appropriately.

Only correcting the error message, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:54 +02:00
Takashi Iwai
6205372c32 ALSA: bt87x: Replace the words white/blacklist
Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:54 +02:00
Takashi Iwai
7933d669ca ALSA: ac97: Replace the words white/blacklist
Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or function/variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15 14:31:53 +02:00
Jon Hunter
ee85a36048 ALSA: hda/tegra: Disable sync-write operation
Commit f34a4c9dd4 ("ALSA: hda: Enable sync-write operation as default
for all controllers") enabled sync-write for all controllers and this is
causing audio playback on the Tegra186 HDA device to fail. For now,
disable sync-write support for Tegra to fix this.

Fixes: f34a4c9dd4 ("ALSA: hda: Enable sync-write operation as default for all controllers")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200714160841.2293-1-jonathanh@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-14 18:13:20 +02:00
Dan Carpenter
b91c9cb9d4 ALSA: echoaudio: re-enable IRQs on failure path
This should be spin_unlock_irq() instead of spin_lock().

Fixes: 6c33125448 ("ALSA: echoaudio: Prevent races in calls to set_audio_format()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200713105324.GB251988@mwanda
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-13 18:04:48 +02:00
Jian-Hong Pan
f50a121d2f ALSA: hda/realtek: Enable headset mic of Acer TravelMate B311R-31 with ALC256
The Acer TravelMate B311R-31 laptop's audio (1025:1430) with ALC256
cannot detect the headset microphone until
ALC256_FIXUP_ACER_MIC_NO_PRESENCE quirk maps the NID 0x19 as the headset
mic pin.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200713060421.62435-1-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-13 08:46:57 +02:00
Armas Spann
ff53664daf ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289
This patch adds support for headset mic to the ASUS ROG Zephyrus
G14(GA401) 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 <zappel@retarded.farm>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200711110557.18681-1-zappel@retarded.farm
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-11 13:33:23 +02:00
Kailang Yang
ef9ddb9dc4 ALSA: hda/realtek - change to suitable link model for ASUS platform
ASUS platform couldn't need to use Headset Mode model.
It changes to the suitable model.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/d05bcff170784ec7bb35023407148161@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-11 11:16:31 +02:00