summaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda/realtek - Cannot adjust speaker's volume on Dell XPS 27 7760Kai-Heng Feng2018-10-041-0/+1
| | | | | | | | | | | | | The issue is the same as commit dd9aa335c880 ("ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO"), the output requires to connect to a node with Amp-out capability. Applying the same fixup ALC298_FIXUP_SPK_VOLUME can fix the issue. BugLink: https://bugs.launchpad.net/bugs/1775068 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Enable runtime PM only for discrete GPUTakashi Iwai2018-09-132-23/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent change of vga_switcheroo allowed the runtime PM for HD-audio on AMD GPUs, but this also resulted in a regression. When the HD-audio controller driver gets runtime-suspended, HD-audio link is turned off, and the hotplug notification is ignored. This leads to the inconsistent audio state (the connection isn't notified and ELD is ignored). The best fix would be to implement the proper ELD notification via the audio component, but it's still not ready. As a quick workaround, this patch adds the check of runtime_idle and allows the runtime suspend only when the vga_switcheroo is bound with discrete GPU. That is, a system with a single GPU and APU would be again without runtime PM to keep the HD-audio link for the hotplug notification and ELD read out. Also, the codec->auto_runtime_pm flag is set only for the discrete GPU at the time GPU gets bound via vga_switcheroo (i.e. only dGPU is forcibly runtime-PM enabled), so that APU can still get the ELD notification. For identifying which GPU is bound, a new vga_switcheroo client callback, gpu_bound, is implemented. The vga_switcheroo simply calls this when GPU is bound, and tells whether it's dGPU or APU. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200945 Fixes: 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller") Reported-by: Jian-Hong Pan <jian-hong@endlessm.com> Tested-by: Jian-Hong Pan <jian-hong@endlessm.com> Acked-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: emu10k1: fix possible info leak to userspace on SNDRV_EMU10K1_IOCTL_INFOWilly Tarreau2018-09-101-1/+1
| | | | | | | | | | | | | | snd_emu10k1_fx8010_ioctl(SNDRV_EMU10K1_IOCTL_INFO) allocates memory using kmalloc() and partially fills it by calling snd_emu10k1_fx8010_info() before returning the resulting structure to userspace, leaving uninitialized holes. Let's just use kzalloc() here. BugLink: http://blog.infosectcbr.com.au/2018/09/linux-kernel-infoleaks.html Signed-off-by: Willy Tarreau <w@1wt.eu> Cc: Jann Horn <jannh@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix cancel_work_sync() stall from jackpoll workTakashi Iwai2018-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | On AMD/ATI controllers, the HD-audio controller driver allows a bus reset upon the error recovery, and its procedure includes the cancellation of pending jack polling work as found in snd_hda_bus_codec_reset(). This works usually fine, but it becomes a problem when the reset happens from the jack poll work itself; then calling cancel_work_sync() from the work being processed tries to wait the finish endlessly. As a workaround, this patch adds the check of current_work() and applies the cancel_work_sync() only when it's not from the jackpoll_work. This doesn't fix the root cause of the reported error below, but at least, it eases the unexpected stall of the whole system. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200937 Cc: <stable@vger.kernel.org> Cc: Lukas Wunner <lukas@wunner.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'sound-fix-4.19-rc1' of ↵Linus Torvalds2018-08-231-1/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "No surprises here: a regression fix for virmidi code refactoring, three fixes for the new AC97 bus compat and runtime PM, and a usual HD-audio quirk" * tag 'sound-fix-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fix HP Headset Mic can't record ALSA: ac97: fix unbalanced pm_runtime_enable ALSA: ac97: fix check of pm_runtime_get_sync failure ALSA: ac97: fix device initialization in the compat layer ALSA: seq: virmidi: Fix discarding the unsubscribed output
| * ALSA: hda/realtek - Fix HP Headset Mic can't recordKailang Yang2018-08-211-1/+17
| | | | | | | | | | | | | | | | This patch will fix HP workstation Headset Mic not recording. Signed-off-by: Kailang Yang <kailang@realtek.com> Tested-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: update dell-wmi mic-mute registration to new world orderLinus Torvalds2018-08-151-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | Commit c647f806b8c2 ("ALSA: hda - Allow multiple ADCs for mic mute LED controls") changed the return value of the snd_hda_gen_add_micmute_led() without actually updating the callers. Admittedly, almost no callers actually cared about the return value. But one call site very much did: the Dell wmi code. It would see the registration return zero, which _used_ to mean "failed" but now means "success", and clear the dell_micmute_led_set_func pointer. End result: the successful registration would end up calling the Dell code that thought it had all failed, and call through a NULL pointer. To make matters worse, it ends up being a tail-call, and with the retpoline sequence you don't even see the caller (dell_micmute_update()) in the stack trace, so the error ended up way less obvious than it should have been. Fixes: c647f806b8c2 "ALSA: hda - Allow multiple ADCs for mic mute LED controls" Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-next' into for-linusTakashi Iwai2018-08-1259-1258/+1344
|\ | | | | | | | | | | Preparation for 4.19 merge material. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: mixart: Mark expected switch fall-throughGustavo A. R. Silva2018-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced the code comment with a proper "fall through" annotation, which is what GCC is expecting to find. Addresses-Coverity-ID: 114889 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add exit commands for Recon3DConnor McAdams2018-08-081-14/+16
| | | | | | | | | | | | | | | | This patch adds exit functions for the Recon3D, and cleans up the current exit function. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Change mixer controls for Recon3DConnor McAdams2018-08-081-7/+11
| | | | | | | | | | | | | | This patch adds changes to setup the Recon3D's mixer controls. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add Recon3D input and output select commandsConnor McAdams2018-08-081-0/+15
| | | | | | | | | | | | | | | | This patch adds commands to the alternative input and output select commands to support the Recon3D. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add DSP setup defaults for Recon3DConnor McAdams2018-08-081-10/+11
| | | | | | | | | | | | | | | | | | | | The Recon3D can use many of the same functions as the Recon3Di, so many of the r3di prefix function remain the same, but change their names to the more generic r3d prefix. This patch does this, and adds quirk checks for things specific to the Recon3Di. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add Recon3D startup functions and setupConnor McAdams2018-08-081-13/+36
| | | | | | | | | | | | | | | | | | This patch adds functions for Recon3D startup, and sets values for things such as use_pci_mmio. It also renames some functions and tables from the sbz prefix into ca0132, as the Recon3D uses them as well. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add bool variable to enable/disable pci region2 mmioConnor McAdams2018-08-081-13/+19
| | | | | | | | | | | | | | | | | | This patch adds the ability to choose whether or not to map the pci region2, which is used for things such as GPIO on the Recon3D and Sound Blaster Z. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add Recon3D pincfgConnor McAdams2018-08-081-2/+24
| | | | | | | | | | | | | | | | This patch adds pin configs from the Recon3D, taken from the Window's driver. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add quirk ID and enum for Recon3DConnor McAdams2018-08-081-0/+2
| | | | | | | | | | | | | | | | This patch adds the PCI subsys ID for the Recon3D that has been tested, and adds the QUIRK_R3D enumeration. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add alt_functions unsolicited responseConnor McAdams2018-08-081-1/+6
| | | | | | | | | | | | | | | | This patch fixes a previous oversight where the microphone unsolicited response would use the wrong input selection function. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Clean up ca0132_init function.Connor McAdams2018-08-081-13/+3
| | | | | | | | | | | | | | | | This patch cleans up ca0132_init by removing unnecessary commands and ordering things better. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Create mmio gpio function to make code clearerConnor McAdams2018-08-081-24/+38
| | | | | | | | | | | | | | | | This patch adds a new function, ca0132_mmio_gpio_set, to clear up what is going on with writes to mmio region 0x320. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: echoaudio: Mark expected switch fall-throughsGustavo A. R. Silva2018-08-061-0/+2
| | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115156 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: emu10k1: Mark expected switch fall-throughsGustavo A. R. Silva2018-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced the code comment with a proper "fall through" annotation, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: mixart: Mark expected switch fall-throughGustavo A. R. Silva2018-08-061-0/+1
| | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Add mute LED quirk for HP Spectre x360Alexandru Gagniuc2018-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | This device has the same issues as the HP x360 wrt the MUTE LED and the front speakers not working. This patch fixes the MUTE LED issue, but doesn't touch the HDA verbs. The fix for the x360 does not work on the Spectre. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pci: Remove empty init and exitTakashi Iwai2018-08-032-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | For a sake of code simplification, remove the init and the exit entries that do nothing. Notes for readers: actually it's OK to remove *both* init and exit, but not OK to remove the exit entry. By removing only the exit while keeping init, the module becomes permanently loaded; i.e. you cannot unload it any longer! Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: sonicvibes: remove redundant pointer 'dir'Colin Ian King2018-08-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | Pointer 'dir' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'dir' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: ens137x: remove redundant array pcm_devsColin Ian King2018-08-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | The array pcm_devs is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'pcm_devs' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: emu10k1: remove redundant variable attnColin Ian King2018-08-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | Variable attn is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'attn' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: cs5535audio: remove redundant pointer 'dma'Colin Ian King2018-08-011-6/+1
| | | | | | | | | | | | | | | | | | | | | | Pointer 'dma' is being assigned but is never used hence it is redundant and can be removed. Cleans up two clang warnings: warning: variable 'dma' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: remove redundant variable max_streamsColin Ian King2018-08-011-5/+0
| | | | | | | | | | | | | | | | | | | | | | Variable max_streams is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'max_streams' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'for-linus' into topic/virmidiTakashi Iwai2018-07-295-10/+13
| |\ | | | | | | | | | | | | | | | | | | Pull the latest ALSA sequencer fixes for the further development of virmidi. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda/hdmi: Use single mutex unlock in error pathsTakashi Iwai2018-07-291-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of calling mutex_unlock() at each error path multiple times, take the standard goto-and-a-single-unlock approach. This will simplify the code and make easier to find the unbalanced mutex locks. No functional changes, but only the code readability improvement as a preliminary work for further changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ctxfi: cthw20k2: Replace mdelay() with msleep() and usleep_range()Jia-Ju Bai2018-07-271-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hw_pll_init(), hw_dac_stop(), hw_dac_start() and hw_adc_init() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA:: ctxfi: cthw20k1: Replace mdelay() with msleep()Jia-Ju Bai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hw_pll_init(), hw_reset_dac() and hw_card_init() are never called in atomic context. They calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: atiixp_modem: Proper endian notationsTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DMA address table in atiixp modem driver is in little-endian, hence we should define it with __le32 properly. Spotted by sparse, a warning like: sound/pci/atiixp_modem.c:360:28: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: atiixp: Proper endian notationsTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DMA address table in atiixp driver is in little-endian, hence we should define it with __le32 properly. Spotted by sparse, a warning like: sound/pci/atiixp.c:393:28: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: bt87x: Proper endian notationsTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RISC data in bt87x is in little-endian, hence we should define it with __le32 properly. Spotted by sparse, a warning like: sound/pci/bt87x.c:240:17: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: echoaudio: Proper endian notationsTakashi Iwai2018-07-275-38/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many data fields defined in echoaudio drivers are in little-endian, hence they should be defined with __le16 or __le32. This makes it easier to catch the forgotten conversions. Spotted by sparse, a warning like: sound/pci/echoaudio/echoaudio_dsp.c:990:36: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: maestro3: Proper endian notationsTakashi Iwai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ASSP data passed to maestro3 driver is in little-endian format, hence the data pointer should be with __le16. Spotted by sparse, warnings like: sound/pci/maestro3.c:2128:35: warning: cast to restricted __le16 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: intel8x0m: Proper endian notationsTakashi Iwai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BD address tables in intel8x0m driver are in little-endian, hence they should be represented as __le32 instead u32. Spotted by sparse, warnings like: sound/pci/intel8x0m.c:406:40: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: intel8x0: Proper endian notationsTakashi Iwai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BD address tables in intel8x0 driver are in little-endian, hence they should be represented as __le32 instead u32. Spotted by sparse, warnings like: sound/pci/intel8x0.c:688:40: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: lola: Proper endian notationsTakashi Iwai2018-07-273-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BDL entries in lola driver are little-endian while we code them as u32. This leads to sparse warnings like: sound/pci/lola/lola.c:105:40: warning: incorrect type in assignment (different base types) sound/pci/lola/lola.c:105:40: expected unsigned int [unsigned] [usertype] <noident> sound/pci/lola/lola.c:105:40: got restricted __le32 [usertype] <noident> This patch fixes the declarations to the proper __le32 type. Also, there was a typo in the original code, where __user was used that was intended as __iomem. This was caused also by sparse: sound/pci/lola/lola_mixer.c:132:27: warning: incorrect type in assignment (different address spaces) Fixed in this patch as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: mixart: Proper endian notationsTakashi Iwai2018-07-273-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The miXart driver deals with big-endian values as raw data, while it declares most of variables as u32. This leads to sparse warnings like sound/pci/mixart/mixart.c:1203:23: warning: cast to restricted __be32 Fix them by properly defining the structs and add the explicit cast to macros. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: riptide: Properly endian notationsTakashi Iwai2018-07-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The SG descriptor of Riptide contains the little-endian values, hence we need to define with __le32 properly. This fixes sparse warnings like: sound/pci/riptide/riptide.c:1112:40: warning: cast to restricted __le32 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: trident: Proper endian notationsTakashi Iwai2018-07-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TLB entries in Trident driver are represented in little-endian, hence they should be declared as __le32. This patch fixes the sparse warnings like: sound/pci/trident/trident_memory.c:226:17: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Proper endian notationsTakashi Iwai2018-07-272-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | The bank values are all little-endians, so they should be defined with __le32. This fixes lots of sparse warnings like: sound/pci/ymfpci/ymfpci_main.c:315:23: warning: cast to restricted __le32 sound/pci/ymfpci/ymfpci_main.c:342:32: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: asihpi: Fix PCM format notationsTakashi Iwai2018-07-271-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asihpi driver treats -1 as an own invalid PCM format, but this needs a proper cast with __force prefix since PCM format type is __bitwise. Define a constant with the proper type and use it allover. This fixes sparse warnings like: sound/pci/asihpi/asihpi.c:315:9: warning: incorrect type in initializer (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: au88x0: Fix sparse warning wrt PCM format typeTakashi Iwai2018-07-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCM format type is with __bitwise, and it can't be converted from integer implicitly. Instead of an ugly cast, declare the function argument of vortex_alsafmt_aspfmt() with the proper snd_pcm_format_t type. This fixes the sparse warning like: sound/pci/au88x0/au88x0_core.c:2778:14: warning: restricted snd_pcm_format_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: riptide: Fix PCM format type conversionTakashi Iwai2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCM format type is with __bitwise, hence it needs to be explicitly declared as snd_pcm_format_t, as warned by sparse: sound/pci/riptide/riptide.c:1028:34: warning: incorrect type in argument 1 (different base types) sound/pci/riptide/riptide.c:1028:34: expected restricted snd_pcm_format_t [usertype] format sound/pci/riptide/riptide.c:1028:34: got unsigned char [unsigned] format Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: trident: Suppress gcc string warningTakashi Iwai2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meddlesome gcc warns about the possible shortname string in trident driver code: sound/pci/trident/trident.c: In function ‘snd_trident_probe’: sound/pci/trident/trident.c:126:2: warning: ‘strcat’ accessing 17 or more bytes at offsets 36 and 20 may overlap 1 byte at offset 36 [-Wrestrict] strcat(card->shortname, card->driver); It happens since gcc calculates the possible string size from card->driver, but this can't be true since we did set the string just before that, and they are much shorter. For shutting it up, use the exactly same string set to card->driver for strcat() to card->shortname, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>