summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-07-17ALSA: line6: Use kmemdup in podhd_set_monitor_level()YueHaibing1-3/+1
Use kmemdup rather than duplicating its implementation. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20200717081710.39180-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-17ALSA: hda: Add support for Loongson 7A1000 controllerKaige Li1-0/+2
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-17Revert "ALSA: pcm: Use SG-buffer only when direct DMA is available"Takashi Iwai1-14/+0
This reverts commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") also the modification commit 467fd0e82b62 ("ALSA: pcm: Fix build error on m68k and others"). Poking the DMA internal helper is a layer violation, so we should avoid that. Meanwhile the actual bug has been addressed by the Kconfig fix in commit dbed452a078d ("dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL"), so we can live without this hack. Link: https://lore.kernel.org/r/20200717064130.22957-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-15ALSA: usb-audio: Replace blacklist wordTakashi Iwai1-1/+1
Follow the recent inclusive terminology guidelines and replace the word "blacklist" appropriately. Only a comment fix, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-11-tiwai@suse.de 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: line6: add hw monitor volume control for POD HD500Vasily Khoruzhick3-2/+132
Add hw monitor volume control for POD HD500. The same change may work for HD500X but I don't have it to test. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Link: https://lore.kernel.org/r/20200713152852.65832-1-anarsoul@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: Replace with fallthrough pseudo keyword in the remaining placesTakashi Iwai6-11/+11
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: xen: Remove superfluous fall through commentsTakashi Iwai2-8/+0
The "fall through" comments found in switch-cases in ALSA xen driver are all superfluous. The kernel coding style allows the multiple cases in a row. Let's remove them. Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200709111750.8337-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: atmel: Remove invalid "fall through" commentsTakashi Iwai1-2/+2
The comments about fall through in sound/atmel/ac97.c are just superfluous and rather confusing. Let's remove them. Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200709111750.8337-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-09ALSA: Use fallthrough pseudo-keywordGustavo A. R. Silva35-80/+78
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-08ALSA: usb/line6: remove 'defined but not used' warningPierre-Louis Bossart1-2/+2
Fix W=1 warning. Variables are declared in a header file included from multiple C files, replace by #defines as suggested by Takashi sound/usb/line6/driver.h:70:18: warning: ‘SYSEX_EXTRA_SIZE’ defined but not used [-Wunused-const-variable=] 70 | static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4; | ^~~~~~~~~~~~~~~~ sound/usb/line6/driver.h:69:18: warning: ‘SYSEX_DATA_OFS’ defined but not used [-Wunused-const-variable=] 69 | static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3; | ^~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200707184924.96291-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pcm: Fix build error on m68k and othersTakashi Iwai1-2/+4
The commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") introduced a check of the DMA type and this caused a build error on m68k (and possibly some others) due to the lack of dma_is_direct() definition. Since the check is needed only for CONFIG_SND_DMA_SGBUF enablement (i.e. solely x86), use #ifdef instead of IS_ENABLED() for avoiding such a build error. Fixes: 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20200707111225.26826-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
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: vx_core: remove warning for empty loop bodyPierre-Louis Bossart1-1/+2
Fix W=1 warning. sound/drivers/vx/vx_core.c: In function ‘snd_vx_threaded_irq_handler’: sound/drivers/vx/vx_core.c:515:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 515 | ; /* so far, nothing to do yet */ | ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: pcmcia/pdaudiocf: fix kernel-docPierre-Louis Bossart1-0/+1
Fix W=1 warnings - add missing context parameter in description Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-22-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: xen: remove 'set but not used' warningPierre-Louis Bossart1-1/+1
Fix W=1 warning. Mark the 'req' variable as __always_unused. sound/xen/xen_snd_front.c: In function ‘xen_snd_front_stream_close’: sound/xen/xen_snd_front.c:117:21: warning: variable ‘req’ set but not used [-Wunused-but-set-variable] 117 | struct xensnd_req *req; | ^~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-18-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-07ALSA: firewire: fix kernel-docPierre-Louis Bossart1-1/+0
Fix W=1 warning. Remove excess function parameter from description Fixes: 7bc93821a70a ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection") Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-13-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: isa/gus: remove 'set but not used' warningPierre-Louis Bossart1-1/+2
Fix W=1 warning by noting variable as __always_unused. sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’: sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 16 | unsigned char stat, data, byte; Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: isa/gus: remove -Wmissing-prototypes warningsPierre-Louis Bossart2-2/+4
Fix W=1 warnings by adding prototypes to header file sound/isa/gus/gus_timer.c:141:6: warning: no previous prototype for ‘snd_gf1_timers_init’ [-Wmissing-prototypes] 141 | void snd_gf1_timers_init(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ sound/isa/gus/gus_timer.c:177:6: warning: no previous prototype for ‘snd_gf1_timers_done’ [-Wmissing-prototypes] 177 | void snd_gf1_timers_done(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ALSA: compress: document the compress gapless audio state machineVinod Koul1-0/+32
Also documented the galpess transitions. Please note that these are not really stream states, but show how the stream steps in gapless mode Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200629134737.105993-3-vkoul@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>