summaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2020-08-06Merge tag 'sound-5.9-rc1' of ↵Linus Torvalds605-5275/+15715
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This became wide and scattered updates all over the sound tree as diffstat shows: lots of (still ongoing) refactoring works in ASoC, fixes and cleanups caught by static analysis, inclusive term conversions as well as lots of new drivers. Below are highlights: ASoC core: - API cleanups and conversions to the unified mute_stream() call - Simplify I/O helper functions - Use helper macros to retrieve RTD from substreams ASoC drivers: - Lots of fixes and cleanups in Intel ASoC drivers - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards, nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards, TI J721e EVM ALSA core: - Minor code refacotring for SG-buffer handling HD-audio: - Generalization of mute-LED handling with LED classdev - Intel silent stream support for HDMI - Device-specific fixes: CA0132, Loongson-3 Others: - Usual USB- and HD-audio quirks for various devices - Fixes for echoaudio DMA position handling - Various documents and trivial fixes for sparse warnings - Conversion to adopt inclusive terms" * tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits) ALSA: pci: delete repeated words in comments ALSA: isa: delete repeated words in comments ALSA: hda/tegra: Add 100us dma stop delay ALSA: hda: Add dma stop delay variable ASoC: hda/tegra: Set buffer alignment to 128 bytes ALSA: seq: oss: Serialize ioctls ALSA: hda/hdmi: Add quirk to force connectivity ALSA: usb-audio: add startech usb audio dock name ALSA: usb-audio: Add support for Lenovo ThinkStation P620 Revert "ALSA: hda: call runtime_allow() for all hda controllers" ALSA: hda/ca0132 - Fix AE-5 microphone selection commands. ALSA: hda/ca0132 - Add new quirk ID for Recon3D. ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value. ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops ALSA: docs: fix typo ALSA: doc: use correct config variable name ASoC: core: Two step component registration ASoC: core: Simplify snd_soc_component_initialize declaration ASoC: core: Relocate and expose snd_soc_component_initialize ASoC: sh: Replace 'select' DMADEVICES 'with depends on' ...
2020-08-06ALSA: pci: delete repeated words in commentsRandy Dunlap7-7/+7
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-06ALSA: isa: delete repeated words in commentsRandy Dunlap2-2/+2
Drop duplicated words in sound/isa/. {be, bit} Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20200806021916.32369-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-05ALSA: hda/tegra: Add 100us dma stop delayMohan Kumar1-0/+1
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-05ALSA: hda: Add dma stop delay variableMohan Kumar1-0/+7
A variable dma_stop_delay is added as a new member in hdac_bus structure to avoid memory decode error incase DMA RUN bit is not disabled in the given timeout from snd_hdac_stream_sync function and followed by stream reset which results in memory decode error between reset set and clear operation. Signed-off-by: Mohan Kumar <mkumard@nvidia.com> Link: https://lore.kernel.org/r/20200805095221.5476-3-mkumard@nvidia.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-05ASoC: hda/tegra: Set buffer alignment to 128 bytesMohan Kumar1-0/+2
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-05ALSA: seq: oss: Serialize ioctlsTakashi Iwai1-1/+7
Some ioctls via OSS sequencer API may race and lead to UAF when the port create and delete are performed concurrently, as spotted by a couple of syzkaller cases. This patch is an attempt to address it by serializing the ioctls with the existing register_mutex. Basically OSS sequencer API is an obsoleted interface and was designed without much consideration of the concurrency. There are very few applications with it, and the concurrent performance isn't asked, hence this "big hammer" approach should be good enough. Reported-by: syzbot+1a54a94bd32716796edd@syzkaller.appspotmail.com Reported-by: syzbot+9d2abfef257f3e2d4713@syzkaller.appspotmail.com Suggested-by: Hillf Danton <hdanton@sina.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200804185815.2453-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-04Merge tag 'uninit-macro-v5.9-rc1' of ↵Linus Torvalds3-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull uninitialized_var() macro removal from Kees Cook: "This is long overdue, and has hidden too many bugs over the years. The series has several "by hand" fixes, and then a trivial treewide replacement. - Clean up non-trivial uses of uninitialized_var() - Update documentation and checkpatch for uninitialized_var() removal - Treewide removal of uninitialized_var()" * tag 'uninit-macro-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: compiler: Remove uninitialized_var() macro treewide: Remove uninitialized_var() usage checkpatch: Remove awareness of uninitialized_var() macro mm/debug_vm_pgtable: Remove uninitialized_var() usage f2fs: Eliminate usage of uninitialized_var() macro media: sur40: Remove uninitialized_var() usage KVM: PPC: Book3S PR: Remove uninitialized_var() usage clk: spear: Remove uninitialized_var() usage clk: st: Remove uninitialized_var() usage spi: davinci: Remove uninitialized_var() usage ide: Remove uninitialized_var() usage rtlwifi: rtl8192cu: Remove uninitialized_var() usage b43: Remove uninitialized_var() usage drbd: Remove uninitialized_var() usage x86/mm/numa: Remove uninitialized_var() usage docs: deprecated.rst: Add uninitialized_var()
2020-08-04Merge tag 'tasklets-v5.9-rc1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull tasklets API update from Kees Cook: "These are the infrastructure updates needed to support converting the tasklet API to something more modern (and hopefully for removal further down the road). There is a 300-patch series waiting in the wings to get set out to subsystem maintainers, but these changes need to be present in the kernel first. Since this has some treewide changes, I carried this series for -next instead of paining Thomas with it in -tip, but it's got his Ack. This is similar to the timer_struct modernization from a while back, but not nearly as messy (I hope). :) - Prepare for tasklet API modernization (Romain Perier, Allen Pais, Kees Cook)" * tag 'tasklets-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: tasklet: Introduce new initialization API treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() usb: gadget: udc: Avoid tasklet passing a global
2020-08-04ALSA: hda/hdmi: Add quirk to force connectivityKai-Heng Feng1-1/+15
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-04ALSA: usb-audio: add startech usb audio dock nameCurtis Malainey1-4/+8
The dock sold from startech (PID: ICUSBAUDIO7D) has no friendly name and shows up currently as "USB Sound Device" in ALSA. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20200804010616.3399256-1-cujomalainey@chromium.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03Merge branch 'linus' of ↵Linus Torvalds1-25/+2
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Add support for allocating transforms on a specific NUMA Node - Introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY for storage users Algorithms: - Drop PMULL based ghash on arm64 - Fixes for building with clang on x86 - Add sha256 helper that does the digest in one go - Add SP800-56A rev 3 validation checks to dh Drivers: - Permit users to specify NUMA node in hisilicon/zip - Add support for i.MX6 in imx-rngc - Add sa2ul crypto driver - Add BA431 hwrng driver - Add Ingenic JZ4780 and X1000 hwrng driver - Spread IRQ affinity in inside-secure and marvell/cesa" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (157 commits) crypto: sa2ul - Fix inconsistent IS_ERR and PTR_ERR hwrng: core - remove redundant initialization of variable ret crypto: x86/curve25519 - Remove unused carry variables crypto: ingenic - Add hardware RNG for Ingenic JZ4780 and X1000 dt-bindings: RNG: Add Ingenic RNG bindings. crypto: caam/qi2 - add module alias crypto: caam - add more RNG hw error codes crypto: caam/jr - remove incorrect reference to caam_jr_register() crypto: caam - silence .setkey in case of bad key length crypto: caam/qi2 - create ahash shared descriptors only once crypto: caam/qi2 - fix error reporting for caam_hash_alloc crypto: caam - remove deadcode on 32-bit platforms crypto: ccp - use generic power management crypto: xts - Replace memcpy() invocation with simple assignment crypto: marvell/cesa - irq balance crypto: inside-secure - irq balance crypto: ecc - SP800-56A rev 3 local public key validation crypto: dh - SP800-56A rev 3 local public key validation crypto: dh - check validity of Z before export lib/mpi: Add mpi_sub_ui() ...
2020-08-03ALSA: usb-audio: Add support for Lenovo ThinkStation P620Kai-Heng Feng3-0/+26
Lenovo ThinkStation P620 is like other TRX40 boards, is equipped with two USB audio cards. USB device (17aa:104d) provides functionality for Internal Speaker and Front Headset. It's UAC v2, so it supports insertion control (jack detection). However, when trying to get the connector status of the speaker, an error occurs: [ 5.787405] usb 3-1: cannot get connectors status: req = 0x81, wValue = 0x200, wIndex = 0x1000, type = 0 Since the insertion control works perfectly for the headset, the error for speaker is probably casued by connecting internally. So let's relax the error for a bit if it's a speaker, and always reports it's connected. USB device (17aa:1046) is for rear Line-in, Line-out and Microphone. The insertion control works for all three jacks. However, there's an Function Unit that doesn't work: [ 5.905415] usb 3-6: cannot get ctl value: req = 0x83, wValue = 0xc00, wIndex = 0x1300, type = 4 [ 5.905418] usb 3-6: 19:0: cannot get min/max values for control 12 (id 19) So turn off the FU to avoid the error. Also, add specific card name for both devices, so userspace can easily indentify both cards. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200803142612.17156-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-08-03Merge tag 'asoc-v5.9' of ↵Takashi Iwai490-4455/+14388
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-03Revert "ALSA: hda: call runtime_allow() for all hda controllers"Hui Wang1-1/+0
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: <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-03ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.Connor McAdams1-3/+3
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-03ALSA: hda/ca0132 - Add new quirk ID for Recon3D.Connor McAdams1-0/+1
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-03ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.Connor McAdams1-0/+5
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-03Merge branch 'for-next' into for-linusTakashi Iwai125-2826/+1159
2020-08-02ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptopsHuacai Chen1-0/+114
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-07-31Merge remote-tracking branch 'asoc/for-5.9' into asoc-nextMark Brown480-4354/+14199
2020-07-31Merge remote-tracking branch 'asoc/for-5.8' into asoc-linusMark Brown19-97/+185
2020-07-31Merge series "ASoC: core: Two step component registration" from Cezary ↵Mark Brown4-42/+49
Rojewski <cezary.rojewski@intel.com>: Provide a mechanism for true two-step component registration. This mimics device registration flow where initialization is the first step while addition goes as second in line. Drivers may choose to modify component's fields before registering component to ASoC subsystem via snd_soc_add_component. Patchset achieves status quo - behavior of snd_soc_register_component remains unchanged. Cezary Rojewski (3): ASoC: core: Relocate and expose snd_soc_component_initialize ASoC: core: Simplify snd_soc_component_initialize declaration ASoC: core: Two step component registration include/sound/soc-component.h | 3 -- include/sound/soc.h | 11 +++--- sound/soc/soc-component.c | 16 --------- sound/soc/soc-core.c | 52 +++++++++++++++++---------- sound/soc/soc-generic-dmaengine-pcm.c | 14 +++++--- sound/soc/stm/stm32_adfsdm.c | 9 +++-- 6 files changed, 55 insertions(+), 50 deletions(-) -- 2.17.1
2020-07-31ASoC: core: Two step component registrationCezary Rojewski3-21/+29
Modify snd_soc_add_component so it calls snd_soc_component_initialize no longer and thus providing true two-step registration. Drivers may choose to change component's fields before actually adding it to ASoC subsystem. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200731144146.6678-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: core: Simplify snd_soc_component_initialize declarationCezary Rojewski1-10/+8
Move 'name' field initialization responsibility back to snd_soc_component_initialize to prepare snd_soc_add_component function for being called separatelly as a second registration step. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200731144146.6678-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: core: Relocate and expose snd_soc_component_initializeCezary Rojewski2-16/+17
To allow for two-step component registration, expose snd_soc_component_initialize function and move it back to soc-core.c. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200731144146.6678-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: sh: Replace 'select' DMADEVICES 'with depends on'Laurent Pinchart1-1/+1
Enabling a whole subsystem from a single driver 'select' is frowned upon and won't be accepted in new drivers, that need to use 'depends on' instead. Existing selection of DMADEVICES will then cause circular dependencies. Replace them with a dependency. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20200731152433.1297-3-laurent.pinchart@ideasonboard.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASKShengjiu Wang2-3/+4
The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on i.MX7ULP. Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for these platform, the FIFO watermark mask should be updated according to the fifo_depth. Fixes: a860fac42097 ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/1596176895-28724-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: meson: cards: deal dpcm flag changeJerome Brunet3-21/+19
Commit b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks") changed the meaning of dpcm_playback/dpcm_capture and now requires the CPU DAI BE to aligned with those flags. This broke all Amlogic cards with uni-directional backends (All gx and most axg cards). While I'm still confused as to how this change is an improvement, those cards can't remain broken forever. Hopefully, next time an API change is done like that, all the users will be updated as part of the change, and not left to fend for themselves. Fixes: b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200731120603.2243261-1-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31ASoC: core: use less strict tests for dailink capabilitiesPierre-Louis Bossart2-25/+33
Previous updates to set dailink capabilities and check dailink capabilities were based on a flawed assumption that all dais support the same capabilities as the dailink. This is true for TDM configurations but existing configurations use an amplifier and a capture device on the same dailink, and the tests would prevent the card from probing. This patch modifies the snd_soc_dai_link_set_capabilities() helper so that the dpcm_playback (resp. dpcm_capture) dailink capabilities are set if at least one dai supports playback (resp. capture). Likewise the checks are modified so that an error is reported only when dpcm_playback (resp. dpcm_capture) is set but none of the CPU DAIs support playback (resp. capture). Fixes: 25612477d20b5 ('ASoC: soc-dai: set dai_link dpcm_ flags with a helper') Fixes: b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks') Suggested-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200723180533.220312-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-31Merge tag 'sound-5.8' of ↵Linus Torvalds6-10/+56
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few wrap-up small fixes for the usual HD-audio and USB-audio stuff: - A regression fix for S3 suspend on old Intel platforms - A fix for possible Oops in ASoC HD-audio binding - Trivial quirks for various devices" * tag 'sound-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fixed HP right speaker no sound ALSA: hda: fix NULL pointer dereference during suspend ALSA: hda/hdmi: Fix keep_power assignment for non-component devices ALSA: hda: Workaround for spurious wakeups on some Intel platforms ALSA: hda/realtek: Fix add a "ultra_low_power" function for intel reference board (alc256) ALSA: hda/realtek: typo_fix: enable headset mic of ASUS ROG Zephyrus G14(GA401) series with ALC289 ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G15(GA502) series with ALC289 ALSA: usb-audio: Add implicit feedback quirk for SSL2
2020-07-30Merge series "drop unnecessary list_empty" from Julia Lawall ↵Mark Brown3-14/+9
<Julia.Lawall@inria.fr>: The various list iterators are able to handle an empty list. The only effect of avoiding the loop is not initializing some index variables. Drop list_empty tests in cases where these variables are not used. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) <smpl> @@ expression x,e; iterator name list_for_each_entry; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each_entry(i,x,...) S - } ... when != i ? i = e @@ expression x,e; iterator name list_for_each_entry_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_entry_safe(i,j,x,...) S - } ... when != i when != j ( i = e; | ? j = e; ) @@ expression x,e; iterator name list_for_each; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each(i,x) S - } ... when != i ? i = e @@ expression x,e; iterator name list_for_each_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_safe(i,j,x) S - } ... when != i when != j ( i = e; | ? j = e; ) // ------------------- @@ expression x,e; statement S; identifier i; @@ -if (!(list_empty(x))) list_for_each_entry(i,x,...) S ... when != i ? i = e @@ expression x,e; statement S; identifier i,j; @@ -if (!(list_empty(x))) list_for_each_entry_safe(i,j,x,...) S ... when != i when != j ( i = e; | ? j = e; ) @@ expression x,e; statement S; identifier i; @@ -if (!(list_empty(x))) list_for_each(i,x) S ... when != i ? i = e @@ expression x,e; statement S; identifier i,j; @@ -if (!(list_empty(x))) list_for_each_safe(i,j,x) S ... when != i when != j ( i = e; | ? j = e; ) </smpl> --- drivers/media/pci/saa7134/saa7134-core.c | 14 ++--- drivers/media/usb/cx231xx/cx231xx-core.c | 16 ++---- drivers/media/usb/tm6000/tm6000-core.c | 24 +++------- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c | 13 ++--- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c | 5 -- drivers/net/ethernet/sfc/ptp.c | 20 +++----- drivers/net/wireless/ath/dfs_pattern_detector.c | 15 ++---- sound/soc/intel/atom/sst/sst_loader.c | 10 +--- sound/soc/intel/skylake/skl-pcm.c | 8 +-- sound/soc/intel/skylake/skl-topology.c | 5 -- 10 files changed, 53 insertions(+), 77 deletions(-)
2020-07-30ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detectionAlper Nebi Yasak1-1/+16
PulseAudio (and perhaps other userspace utilities) can not detect any jack for rk3399_gru_sound as the driver doesn't expose related Jack kcontrols. This patch adds two DAPM pins to the headset jack, where the snd_soc_card_jack_new() call automatically creates "Headphones Jack" and "Headset Mic Jack" kcontrols from them. With an appropriate ALSA UCM config specifying JackControl fields for the "Headphones" and "Headset" (mic) devices, PulseAudio can detect plug/unplug events for both of them after this patch. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20200721182709.6895-1-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: wm8962: Do not access WM8962_GPIO_BASEFabio Estevam1-3/+8
According to the WM8962 datasheet, there is no register at address 0x200. WM8962_GPIO_BASE is just a base address for the GPIO registers and not a real register, so remove it from wm8962_readable_register(). Also, Register 515 (WM8962_GPIO_BASE + 3) does not exist, so skip its access. This fixes the following errors: wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200717135959.19212-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: SOF: imx: use resource_sizeJulia Lawall1-2/+1
Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) <smpl> @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/1595751933-4952-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: Intel: drop unnecessary list_emptyJulia Lawall3-14/+9
list_for_each_entry_safe is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry_safe is defined in terms of list_first_entry, which indicates that it should not be used on an empty list. But in list_for_each_entry_safe, the element obtained by list_first_entry is not really accessed, only the address of its list_head field is compared to the address of the list head, so the list_first_entry is safe. The semantic patch that makes this change is as follows (with another variant for the no brace case): (http://coccinelle.lip6.fr/) <smpl> @@ expression x,e; iterator name list_for_each_entry_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_entry_safe(i,j,x,...) S - } ... when != i when != j ( i = e; | ? j = e; ) </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/1595761112-11003-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30Merge series "ASoC: Intel: KMB: TDM Enablement patches" from Michael Sit Wei ↵Mark Brown2-9/+24
Hong <michael.wei.hong.sit@intel.com>: This patch series is to enable multiple features on the Keembay Platform Michael Sit Wei Hong (4): ASoC: Intel: KMB: Add 8kHz audio support ASoC: Intel: KMB: Rework disable channel function ASoC: Intel: KMB: Enable TDM audio capture dt-bindings: sound: intel,keembay-i2s: Add channel-max property .../bindings/sound/intel,keembay-i2s.yaml | 8 + sound/soc/intel/keembay/kmb_platform.c | 137 +++++++++++++----- sound/soc/intel/keembay/kmb_platform.h | 1 + 3 files changed, 112 insertions(+), 34 deletions(-) -- 2.17.1
2020-07-30Merge series "ASoC: meson: tdm fixes" from Jerome Brunet <jbrunet@baylibre.com>:Mark Brown11-46/+124
This patcheset is collection of fixes for the TDM input and output the axg audio architecture. Its fixes: - slave mode format setting - g12 and sm1 skew offset - tdm clock inversion - standard daifmt props names which don't require a specific prefix Jerome Brunet (4): ASoC: meson: axg-tdm-interface: fix link fmt setup ASoC: meson: axg-tdmin: fix g12a skew ASoC: meson: axg-tdm-formatters: fix sclk inversion ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties sound/soc/meson/axg-tdm-formatter.c | 11 ++++++----- sound/soc/meson/axg-tdm-formatter.h | 1 - sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++--------- sound/soc/meson/axg-tdmin.c | 16 +++++++++++++++- sound/soc/meson/axg-tdmout.c | 3 --- sound/soc/meson/meson-card-utils.c | 2 +- 6 files changed, 39 insertions(+), 20 deletions(-) -- 2.25.4
2020-07-30ASoC: amd: Added hw_params support for ALC1015Ravulapati Vishnu vardhan rao1-0/+29
Adding rt1015 hw_params which set Bit-clock ratio, PLL and appropriate sys clk specific with RTK1015. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-6-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Adding DAI LINK for rt1015 codecRavulapati Vishnu vardhan rao1-5/+30
DAI link support for RTK 1015 and providing the codec details depending on the snd_soc_card selected by ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-5-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Adding support for ALC1015 codec in machine driverRavulapati Vishnu vardhan rao2-4/+60
Adding support for ALC1015 RTK codec in machine driver. Passing specific card structure based on its ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-4-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Passing card structure based on codecRavulapati Vishnu vardhan rao1-5/+20
Passing specific snd_soc_card structure depending on the ACPI ID. In future we can add other IDs in the ACPI table and pass the structure. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-3-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: amd: Renaming snd-soc-card structure and fieldsRavulapati Vishnu vardhan rao1-14/+14
As in future our machine driver supports multiple codecs So changing naming convention of snd_soc_card struct and its fields. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200728160255.31020-2-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: samsung: Add sound support for Midas boardsSimon Shields3-0/+553
This patch adds support for voice and BT calls, along with standard audio output via the speaker, earpiece, headphone jack, HDMI, and any accessories compatible with Midas boards. This patch also supports headphone/headset detection and headsets with inline buttons. [m.szyprowski: adaptation to v5.1+ kernels (DAI links initialization)] [s.nawrocki: removal of the clk API calls for CODEC MCLK, the jack data structure moved to struct midas_priv, coding style and typo fixes, conversion to new cpu/codec/dai-node binding] Signed-off-by: Simon Shields <simon@lineageos.org> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200728131111.14334-2-s.nawrocki@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: tlv320adcx140: Move device reset to before programmingDan Murphy1-4/+4
Reset the device before programming the registers or all programming will be lost as the device resets registers to default settings. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200730142419.28205-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: tlv320adcx140: Fix GPO register start addressDan Murphy1-1/+1
The header was updated to align with the data sheet to start the GPO_CFG at GPO_CFG0. The code was not updated to the change and therefore the GPO_CFG0 register was not written to. Fixes: 6617cff6a05e ("ASoC: tlv320adcx140: Add GPO configuration and drive output config") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200730142419.28205-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: Intel: KMB: Rework disable channel functionMichael Sit Wei Hong2-3/+8
All channels are enabled at boot up, this patch ensures that all channels are disabled at boot and whenever the function is called. Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200730055319.1522-3-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30ASoC: Intel: KMB: Add 8kHz audio supportMichael Sit Wei Hong1-6/+16
Enable 8kHz audio support for Intel Keem Bay platform. Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200730055319.1522-2-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30Merge series "ASoC: meson: tdm fixes" from Jerome Brunet <jbrunet@baylibre.com>:Mark Brown5-19/+38
This patcheset is collection of fixes for the TDM input and output the axg audio architecture. Its fixes: - slave mode format setting - g12 and sm1 skew offset - tdm clock inversion - standard daifmt props names which don't require a specific prefix Jerome Brunet (4): ASoC: meson: axg-tdm-interface: fix link fmt setup ASoC: meson: axg-tdmin: fix g12a skew ASoC: meson: axg-tdm-formatters: fix sclk inversion ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties sound/soc/meson/axg-tdm-formatter.c | 11 ++++++----- sound/soc/meson/axg-tdm-formatter.h | 1 - sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++--------- sound/soc/meson/axg-tdmin.c | 16 +++++++++++++++- sound/soc/meson/axg-tdmout.c | 3 --- sound/soc/meson/meson-card-utils.c | 2 +- 6 files changed, 39 insertions(+), 20 deletions(-) -- 2.25.4
2020-07-30ASoC: soc-core: Fix regression causing sysfs entries to disappearCharles Keepax1-1/+4
The allocation order of things in soc_new_pcm_runtime was changed to move the device_register before the allocation of the rtd structure. This was to allow the rtd allocation to be managed by devm. However currently the sysfs entries are added by device_register and their visibility depends on variables within the rtd structure, this causes the pmdown_time and dapm_widgets sysfs entries to be missing for all rtds. Correct this issue by manually calling device_add_groups after the appropriate information is available. Fixes: d918a37610b1 ("ASoC: soc-core: tidyup soc_new_pcm_runtime() alloc order") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200730120715.637-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>