aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-07-16ALSA: hda: export snd_hda_codec_cleanup_for_unbind()Kai Vehmanen1-0/+1
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-16ALSA: hda/realtek - fixup for yet another Intel reference boardPeiSen Hou1-0/+1
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-16ALSA: hda/realtek - Enable Speaker for ASUS UX563Kailang Yang1-0/+1
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-16ALSA: hda/realtek - Enable Speaker for ASUS UX533 and UX534Kailang Yang1-0/+2
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: 4e051106730d ("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-15ALSA: via82xx: Replace the words whitelistTakashi Iwai1-3/+3
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-15ALSA: nm256: Replace the words blacklistTakashi Iwai1-4/+4
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-15ALSA: intel8x0: Replace the words white/blacklistTakashi Iwai1-3/+3
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-15ALSA: hda: Replace the words white/blacklistTakashi Iwai2-16/+16
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-15ALSA: es1968: Replace the words white/blacklistTakashi Iwai1-10/+10
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-15ALSA: ctxfi: Replace the word blacklistTakashi Iwai1-1/+1
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-15ALSA: bt87x: Replace the words white/blacklistTakashi Iwai1-7/+7
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-15ALSA: ac97: Replace the words white/blacklistTakashi Iwai1-7/+7
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-14ALSA: hda/tegra: Disable sync-write operationJon Hunter1-0/+1
Commit f34a4c9dd4ca ("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: f34a4c9dd4ca ("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-13ALSA: echoaudio: re-enable IRQs on failure pathDan Carpenter1-1/+1
This should be spin_unlock_irq() instead of spin_lock(). Fixes: 6c3312544873 ("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-13ALSA: hda/realtek: Enable headset mic of Acer TravelMate B311R-31 with ALC256Jian-Hong Pan1-0/+11
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-11ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289Armas Spann1-0/+9
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-11ALSA: hda/realtek - change to suitable link model for ASUS platformKailang Yang1-2/+2
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-09ALSA: Replace with fallthrough pseudo keyword in the remaining placesTakashi Iwai2-7/+7
A few places (except for ASoC) are left unconverted for the new fallthrough pseudo keyword. Now replace them all. Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200709111750.8337-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: Use fallthrough pseudo-keywordGustavo A. R. Silva14-26/+25
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: echoaudio: Address bugs in the interrupt handlingMark Hills2-28/+65
Distorted audio appears occasionally, affecting either playback or capture and requiring the affected substream to be closed by all applications and re-opened. The best way I have found to reproduce the bug is to use dmix in combination with Chromium, which opens the audio device multiple times in threads. Anecdotally, the problems appear to have increased with faster CPUs. I ruled out 32-bit counter wrapping; it often happens much earlier. Since applying this patch I have not had problems, where previously they would occur several times a day. The patch targets the following issues: * Check for progress using the counter from the hardware, not after it has been truncated to the buffer. This is a clean way to address a possible bug where if a whole ringbuffer advances between interrupts, it goes unnoticed. * Move last_period state from chip to pipe This more logically belongs as part of pipe, and code is reasier to read if it is "counter position last time a period elapsed". Now the code has no references to period count. A period is just when the regular counter crosses a threshold. This increases readability and reduces scope for bugs. * Treat period notification and buffer advance independently: This helps to clarify what is the responsibility of the interrupt handler, and what is pcm_pointer(). Removing shared state between these operations means race conditions are fixed without introducing locks. Synchronisation is only around the read of pipe->dma_counter. There may be cache line contention around "struct audiopipe" but I did not have cause to profile this. Pay attention to be robust where dma_counter wrapping is not a multiple of period_size or buffer_size. This is a revised patch based on feedback from Takashi and Giuliano. Signed-off-by: Mark Hills <mark@xwax.org> Link: https://lore.kernel.org/r/20200708101848.3457-5-mark@xwax.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: echoaudio: Prevent some noise on unloading the moduleMark Hills1-2/+2
These are valid conditions in normal circumstances, so do not "warn" but make them for debugging. Signed-off-by: Mark Hills <mark@xwax.org> Link: https://lore.kernel.org/r/20200708101848.3457-4-mark@xwax.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: echoaudio: Prevent races in calls to set_audio_format()Mark Hills1-1/+14
The function uses chip->comm_page which needs locking against other use at the same time. Signed-off-by: Mark Hills <mark@xwax.org> Link: https://lore.kernel.org/r/20200708101848.3457-3-mark@xwax.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: echoaudio: Race conditions around "opencount"Mark Hills2-37/+45
Use of atomics does not make these statements robust: atomic_inc(&chip->opencount); if (atomic_read(&chip->opencount) > 1 && chip->rate_set) chip->can_set_rate=0; and if (atomic_read(&chip->opencount)) { if (chip->opencount) { changed = -EAGAIN; } else { changed = set_digital_mode(chip, dmode); It would be necessary to atomically increment or decrement the value and use the returned result. And yet we still need to prevent other threads making use of "can_set_rate" while we set it. However in all but one case the atomic is misleading as they are already running with "mode_mutex" held. Decisions are made on mode setting are often intrinsically connected to "opencount" because some operations are not permitted unless there is sole ownership. So instead simplify this, and use "mode_mutex" as a lock for all reference counting and mode setting. Signed-off-by: Mark Hills <mark@xwax.org> Link: https://lore.kernel.org/r/20200708101848.3457-2-mark@xwax.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: echoaudio: Remove redundant checkMark Hills1-5/+0
This check is always false, as it's not the responsibilty of the device-specific code to make this check. It is already checked in snd_echo_digital_mode_put. I do not have a Mona interface to test this change. This patch is in preparation for follow-up patch to modify the behavior of "opencount". Signed-off-by: Mark Hills <mark@xwax.org> Link: https://lore.kernel.org/r/20200708101848.3457-1-mark@xwax.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-08Merge tag 'sound-5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/soundLinus Torvalds3-17/+68
Pull sound fixes from Takashi Iwai: "A collection of small, mostly device-specific fixes. The significant one is the regression fix for USB-audio implicit feedback devices due to the incorrect frame size calculation, which landed in 5.8 and stable trees. In addition, a few usual HD-audio and USB-audio quirks, Intel HDMI fixes, ASoC fsl and rt5682 fixes, as well as the fix in compress-offload partial drain operation" * tag 'sound-5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: compress: fix partial_drain completion state ALSA: usb-audio: Add implicit feedback quirk for RTX6001 ALSA: usb-audio: add quirk for MacroSilicon MS2109 ALSA: hda/realtek: Enable headset mic of Acer Veriton N4660G with ALC269VC ALSA: hda/realtek: Enable headset mic of Acer C20-820 with ALC269VC ALSA: hda/realtek - Enable audio jacks of Acer vCopperbox with ALC269VC ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk subdevice id ALSA: hda/hdmi: improve debug traces for stream lookups ALSA: hda/hdmi: fix failures at PCM open on Intel ICL and later ALSA: opl3: fix infoleak in opl3 ALSA: usb-audio: Replace s/frame/packet/ where appropriate ALSA: usb-audio: Fix packet size calculation AsoC: amd: add missing snd- module prefix to the acp3x-rn driver kernel module ALSA: hda - let hs_mic be picked ahead of hp_mic ASoC: rt5682: fix the pop noise while OMTP type headset plugin ASoC: fsl_mqs: Fix unchecked return value for clk_prepare_enable ASoC: fsl_mqs: Don't check clock is NULL before calling clk API
2020-07-07ALSA: hda/hdmi: Add Intel silent stream supportHarsha Priya2-0/+78
External HDMI receivers have analog circuitry that needs to be powered-on when exiting standby, and a mechanism to detect PCM v. IEC61937 data. These two steps take time and up to 2-3 seconds of audio may be muted when starting playback. Intel hardware (Haswell and beyond) can keep the link active with a 'silent stream', so that the receiver does not go through those two steps when valid audio is transmitted. This mechanism relies on an setting the channel_id as 0xf, sending info packet and preventing the codec from going to D3, which will increase the platform static power consumption. The info packet assumes a basic 2ch stereo, and the silent stream is enabled when connecting a monitor. In case of format changes the detection of PCM v. IEC61937 needs to be re-run. In this case there is no way to avoid the 2-3s mute. The silent stream is enabled with a Kconfig option, as well as a kernel parameter should there be a need to override the build time default. This approach is used based on the power_save capability as an example, but in the future, it may be used with a kcontrol, depending on UCM support for HDaudio legacy. Signed-off-by: Harsha Priya <harshapriya.n@intel.com> Signed-off-by: Emmanuel Jillela <emmanuel.jillela@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/1594068797-14011-1-git-send-email-harshapriya.n@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/au88x0: remove "defined but not used" warningsPierre-Louis Bossart2-22/+22
Fix W=1 warnings. Mark all unused tables with __maybe_unused. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-24-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/via82xx: remove 'set but not used' warningsPierre-Louis Bossart2-2/+2
Fix W=1 warnings. Mark variables as __always_unused. sound/pci/via82xx.c: In function ‘snd_via82xx_codec_wait’: sound/pci/via82xx.c:547:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 547 | int err; | ^~~ sound/pci/via82xx_modem.c: In function ‘snd_via82xx_codec_wait’: sound/pci/via82xx_modem.c:401:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 401 | int err; | ^~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/fm801: fix kernel-docPierre-Louis Bossart1-0/+27
Fix W=1 warnings, add missing field descriptions. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/es1938: remove 'set but not used' warningPierre-Louis Bossart1-1/+2
Fix W=1 warning. Mark the 'audiostatus' variable as __always_unused. sound/pci/es1938.c: In function ‘snd_es1938_interrupt’: sound/pci/es1938.c:1622:24: warning: variable ‘audiostatus’ set but not used [-Wunused-but-set-variable] 1622 | unsigned char status, audiostatus; | ^~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/oxygen/xonar_wm87x6: remove always true conditionPierre-Louis Bossart1-2/+4
Fix W=1 warnings: sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8776_write’: sound/pci/oxygen/xonar_wm87x6.c:119:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 119 | if (reg >= WM8776_HPLVOL && reg <= WM8776_DACMASTER) | ^~ sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8766_write’: sound/pci/oxygen/xonar_wm87x6.c:147:12: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 147 | if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) || | ^~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/rme9652/hdspm: remove always true conditionPierre-Louis Bossart1-2/+2
Fix W=1 warning: sound/pci/rme9652/hdspm.c: In function ‘hdspm_autosync_ref’: sound/pci/rme9652/hdspm.c:3030:16: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 3030 | if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) && | ^~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/korg1212: remove 'set but not used' warningsPierre-Louis Bossart1-1/+3
Fix W=1 warnings. Two variables are only used for debug logs, mark with __maybe_unused: sound/pci/korg1212/korg1212.c: In function ‘snd_korg1212_create’: sound/pci/korg1212/korg1212.c:2152:36: warning: variable ‘iomem2_size’ set but not used [-Wunused-but-set-variable] 2152 | unsigned ioport_size, iomem_size, iomem2_size; | ^~~~~~~~~~~ sound/pci/korg1212/korg1212.c:2152:11: warning: variable ‘ioport_size’ set but not used [-Wunused-but-set-variable] 2152 | unsigned ioport_size, iomem_size, iomem2_size; | ^~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/emu10k1: remove 'set but not used' warningPierre-Louis Bossart1-1/+2
Fix W=1 warning. The loopsize variable is only used in compiled-out code, so mark with __maybe_unused. sound/pci/emu10k1/emu10k1_patch.c: In function ‘snd_emu10k1_sample_new’: sound/pci/emu10k1/emu10k1_patch.c:30:22: warning: variable ‘loopsize’ set but not used [-Wunused-but-set-variable] 30 | int truesize, size, loopsize, blocksize; | ^~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ASoC: pci/emu10k1: remove "set but not used' warningsPierre-Louis Bossart1-2/+2
Fix W=1 warnings. Mark variables used for reads as __always_unused. sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu10k1_cardbus_init’: sound/pci/emu10k1/emu10k1_main.c:626:15: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] 626 | unsigned int value; | ^~~~~ sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu1010_load_firmware_entry’: sound/pci/emu10k1/emu10k1_main.c:656:15: warning: variable ‘write_post’ set but not used [-Wunused-but-set-variable] 656 | unsigned int write_post; | ^~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/ctxfi: fix kernel-doc warningsPierre-Louis Bossart6-6/+6
Fix W=1 warnings. The files contain formatting that isn't kernel-doc. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/ctxfi/ctatc: fix kernel-docPierre-Louis Bossart1-0/+4
Fix W=1 warnings. Add missing arguments and description. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/aw2-saa7146: remove 'set but not used' warningPierre-Louis Bossart1-1/+1
Fix W=1 warning by nothing variable as always unused. sound/pci/aw2/aw2-saa7146.c: In function ‘snd_aw2_saa7146_interrupt’: sound/pci/aw2/aw2-saa7146.c:333:15: warning: variable ‘iicsta’ set but not used [-Wunused-but-set-variable] 333 | unsigned int iicsta; | ^~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/echoaudio: remove 'set but not used' warningPierre-Louis Bossart1-1/+2
Fix W=1 warning. One variable is only used in a conditionally-compiled block, mark as __maybe_unused sound/pci/echoaudio/echoaudio.c: In function ‘snd_echo_probe’: sound/pci/echoaudio/echoaudio.c:1958:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable] 1958 | int i, err; | ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/asihpi: remove 'set but not used' warningPierre-Louis Bossart1-2/+2
Fix W=1 warnings, mark variables as __always_unused sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’: sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1907 | u32 num_bands; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’: sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1934 | u32 num_bands; | ^~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/asihpi: fix kernel-docPierre-Louis Bossart1-12/+14
Fix W=1 warnings. The code certainly predates .rst syntax, adjust as needed. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pci/asihpi: remove 'set but not used' warningsPierre-Louis Bossart1-7/+5
Fix W=1 warnings by removing 2 unnecessary initializations and removing a variable that's not used. sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’: sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1907 | u32 num_bands = 0; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’: sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1934 | u32 num_bands = 0; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_mux_info’: sound/pci/asihpi/asihpi.c:2164:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 2164 | int err; | ^~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: hda: fix SND_HDA_GENERIC kconfig & buildRandy Dunlap1-0/+1
Fix kconfig warnings and lots of subsequent build errors by adding yet another ugly select statement: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] WARNING: unmet direct dependencies detected for LEDS_TRIGGERS Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=y] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] Selected by [m]: - MAC80211_LEDS [=y] && NET [=y] && WIRELESS [=y] && MAC80211 [=m] && LEDS_CLASS [=y] - IWLWIFI_LEDS [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_INTEL [=y] && IWLWIFI [=m] && (LEDS_CLASS [=y]=y || LEDS_CLASS [=y]=IWLWIFI [=m]) && (IWLMVM [=m] || IWLDVM [=m]) WARNING: unmet direct dependencies detected for LEDS_TRIGGER_AUDIO Depends on [n]: NEW_LEDS [=n] && LEDS_TRIGGERS [=y] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] Fixes: 7cdf8c49b1df ("ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/01233744-9625-38b3-0342-1b37250dbc72@infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: hda/realtek: Enable headset mic of Acer Veriton N4660G with ALC269VCJian-Hong Pan1-0/+11
The Acer Veriton N4660G desktop's audio (1025:1248) with ALC269VC cannot detect the headset microphone until ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE quirk maps the NID 0x18 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/20200706071826.39726-3-jian-hong@endlessm.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: hda/realtek: Enable headset mic of Acer C20-820 with ALC269VCJian-Hong Pan1-0/+11
The Acer Aspire C20-820 AIO's audio (1025:1065) with ALC269VC can't detect the headset microphone until ALC269VC_FIXUP_ACER_HEADSET_MIC quirk maps the NID 0x18 as the headset mic pin. Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com> Signed-off-by: Daniel Drake <drake@endlessm.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200706071826.39726-2-jian-hong@endlessm.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: hda/realtek - Enable audio jacks of Acer vCopperbox with ALC269VCJian-Hong Pan1-0/+13
The Acer desktop vCopperbox with ALC269VC cannot detect the MIC of headset, the line out and internal speaker until ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS quirk applied. Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com> Signed-off-by: Chris Chiu <chiu@endlessm.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200706071826.39726-1-jian-hong@endlessm.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk subdevice idBenjamin Poirier1-2/+1
1) In snd_hda_pick_fixup(), quirks are first matched by PCI SSID and then, if there is no match, by codec SSID. The Lenovo "ThinkPad X1 Carbon 7th" has an audio chip with PCI SSID 0x2292 and codec SSID 0x2293[1]. Therefore, fix the quirk meant for that device to match on .subdevice == 0x2292. 2) The "Thinkpad X1 Yoga 7th" does not exist. The companion product to the Carbon 7th is the Yoga 4th. That device has an audio chip with PCI SSID 0x2292 and codec SSID 0x2292[2]. Given the behavior of snd_hda_pick_fixup(), it is not possible to have a separate quirk for the Yoga based on SSID. Therefore, merge the quirks meant for the Carbon and Yoga. This preserves the current behavior for the Yoga. [1] This is the case on my own machine and can also be checked here https://github.com/linuxhw/LsPCI/tree/master/Notebook/Lenovo/ThinkPad https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3225701 [2] https://github.com/linuxhw/LsPCI/tree/master/Convertible/Lenovo/ThinkPad https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3176355 Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen") Fixes: 54a6a7dc107d ("ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen") Cc: Jaroslav Kysela <perex@perex.cz> Cc: Kailang Yang <kailang@realtek.com> Tested-by: Vincent Bernat <vincent@bernat.ch> Tested-by: Even Brenden <evenbrenden@gmail.com> Signed-off-by: Benjamin Poirier <benjamin.poirier@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200703080005.8942-2-benjamin.poirier@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: hda/hdmi: improve debug traces for stream lookupsKai Vehmanen1-2/+3
The HDMI codec driver has two debug traces printed from different functions but with identical message content: "HDMI: hinfo 000000006a6b84d9 not registered" Fix this duplication and also add a bit more context in addition to raw object pointer, to help analysis of kernel logs. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200703153818.2808592-2-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: hda/hdmi: fix failures at PCM open on Intel ICL and laterKai Vehmanen1-13/+23
When HDMI PCM devices are opened in a specific order, with at least one HDMI/DP receiver connected, ALSA PCM open fails to -EBUSY on the connected monitor, on recent Intel platforms (ICL/JSL and newer). While this is not a typical sequence, at least Pulseaudio does this every time when it is started, to discover the available PCMs. The rootcause is an invalid assumption in hdmi_add_pin(), where the total number of converters is assumed to be known at the time the function is called. On older Intel platforms this held true, but after ICL/JSL, the order how pins and converters are in the subnode list as returned by snd_hda_get_sub_nodes(), was changed. As a result, information for some converters was not stored to per_pin->mux_nids. And this means some pins cannot be connected to all converters, and application instead gets -EBUSY instead at open. The assumption that converters are always before pins in the subnode list, is not really a valid one. Fix the problem in hdmi_parse_codec() by introducing separate loops for discovering converters and pins. BugLink: https://github.com/thesofproject/linux/issues/1978 BugLink: https://github.com/thesofproject/linux/issues/2216 BugLink: https://github.com/thesofproject/linux/issues/2217 Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200703153818.2808592-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-06-25Merge tag 'sound-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/soundLinus Torvalds3-0/+16
Pull sound fixes from Takashi Iwai: "A collection of small fixes gathered in the last two weeks. The major changes here are fixes for the recent DPCM regressions found on i.MX and Qualcomm platforms and fixes for resource leaks in ASoC DAI registrations. Other than those are mostly device-specific fixes including the usual USB- and HD-audio quirks, and a fix for syzkaller case and ID updates for new Intel platforms" * tag 'sound-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits) ALSA: usb-audio: Fix OOB access of mixer element list ALSA: usb-audio: add quirk for Samsung USBC Headset (AKG) ALSA: usb-audio: Add registration quirk for Kingston HyperX Cloud Flight S ASoC: rockchip: Fix a reference count leak. ASoC: amd: closing specific instance. ALSA: hda: Intel: add missing PCI IDs for ICL-H, TGL-H and EKL ASoC: hdac_hda: fix memleak with regmap not freed on remove ASoC: SOF: Intel: add PCI IDs for ICL-H and TGL-H ASoC: SOF: Intel: add PCI ID for CometLake-S ASoC: Intel: SOF: merge COMETLAKE_LP and COMETLAKE_H ALSA: hda/realtek: Add mute LED and micmute LED support for HP systems ALSA: usb-audio: Fix potential use-after-free of streams ALSA: hda/realtek - Add quirk for MSI GE63 laptop ASoC: fsl_ssi: Fix bclk calculation for mono channel ASoC: SOF: Intel: hda: Clear RIRB status before reading WP ASoC: rt1015: Update rt1015 default register value according to spec modification. ASoC: qcom: common: set correct directions for dailinks ASoc: q6afe: add support to get port direction ASoC: soc-pcm: fix checks for multi-cpu FE dailinks ASoC: rt5682: Let dai clks be registered whether mclk exists or not ...