summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: usb-audio: Initial Power Domain supportJorge Sanjuan2018-07-314-0/+128
| | | | | | | | | | | | | | | | | | Thee USB Audio Class 3 (UAC3) introduces Power Domains as a new feature to let a host turn individual parts of an audio function to different power states via USB requests. This lets the device get to know a bit amore about what the host is up to in order to optimize power consumption efficiently. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan <jorge.sanjuan@codethink.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: seq: virmidi: Use READ_ONCE/WRITE_ONCE() macrosTakashi Iwai2018-07-302-10/+6
| | | | | | | | The trigger flag in vmidi object can be referred in different contexts concurrently, hence it's better to be put with READ_ONCE() and WRITE_ONCE() macros to assure the accesses. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: seq: virmidi: Offload the output event processingTakashi Iwai2018-07-302-54/+47
| | | | | | | | | | | | | | | | | | | | | | | | | The virmidi sequencer stuff tries to translate the rawmidi bytes to sequencer events and deliver the packets at trigger callback. The amount of the whole process of these translations and deliveries depends on the incoming rawmidi bytes, and we have no limit for that; this was the cause of a CPU soft lockup that had been reported and fixed recently. Although we've fixed the soft lockup by putting the temporary unlock and cond_resched(), it's rather a quick band aid. In this patch, meanwhile, the event parsing and delivery process is offloaded to a dedicated work, and the trigger callback just kicks it off. It has three merits, at least: - The processing is always done in a sleepable context, which can assure the event delivery with non-atomic flag without hackish is_atomic() usage. - Other relevant codes can be simplified, reducing the lines - It makes me happier Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into topic/virmidiTakashi Iwai2018-07-2910-23/+32
|\ | | | | | | | | | | | | Pull the latest ALSA sequencer fixes for the further development of virmidi. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Sleep for 10ms after entering D3 on Conexant codecsPark Ju Hyung2018-07-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On rare occasions, we are still noticing that the internal speaker spitting out spurious noises even after adding the problematic codec to the list. Adding a 10ms artificial delay before rebooting fixes the issue entirely. Patch for Realtek codecs also adds the same amount of delay after entering D3. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Turn CX8200 into D3 as well upon rebootPark Ju Hyung2018-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As an equivalent codec with CX20724, CX8200 is also subject to the reboot bug. Late 2017 and 2018 LG Gram and some HP Spectre laptops are known victims to this issue, causing extremely loud noises upon reboot. Now that we know that this bug is subject to multiple codecs, fix the comment as well. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: virmidi: Fix too long output trigger loopTakashi Iwai2018-07-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The virmidi output trigger tries to parse the all available bytes and process sequencer events as much as possible. In a normal situation, this is supposed to be relatively short, but a program may give a huge buffer and it'll take a long time in a single spin lock, which may eventually lead to a soft lockup. This patch simply adds a workaround, a cond_resched() call in the loop if applicable. A better solution would be to move the event processor into a work, but let's put a duct-tape quickly at first. Reported-and-tested-by: Dae R. Jeong <threeearcat@gmail.com> Reported-by: syzbot+619d9f40141d826b097e@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: cs5535audio: Fix invalid endian conversionTakashi Iwai2018-07-262-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | One place in cs5535audio_build_dma_packets() does an extra conversion via cpu_to_le32(); namely jmpprd_addr is passed to setup_prd() ops, which writes the value via cs_writel(). That is, the callback does the conversion by itself, and we don't need to convert beforehand. This patch fixes that bogus conversion. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: vxpocket: Fix invalid endian conversionsTakashi Iwai2018-07-261-5/+5
| | | | | | | | | | | | | | | | | | The endian conversions used in vxp_dma_read() and vxp_dma_write() are superfluous and even wrong on big-endian machines, as inw() and outw() already do conversions. Kill them. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: vx222: Fix invalid endian conversionsTakashi Iwai2018-07-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The endian conversions used in vx2_dma_read() and vx2_dma_write() are superfluous and even wrong on big-endian machines, as inl() and outl() already do conversions. Kill them. Spotted by sparse, a warning like: sound/pci/vx222/vx222_ops.c:278:30: warning: incorrect type in argument 1 (different base types) Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: seq: Fix poll() error returnTakashi Iwai2018-07-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | The sanity checks in ALSA sequencer and OSS sequencer emulation codes return falsely -ENXIO from poll callback. They should be EPOLLERR instead. This was caught thanks to the recent change to the return value. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: memalloc: Don't exceed over the requested sizeTakashi Iwai2018-07-231-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_dma_alloc_pages_fallback() tries to allocate pages again when the allocation fails with reduced size. But the first try actually *increases* the size to power-of-two, which may give back a larger chunk than the requested size. This confuses the callers, e.g. sgbuf assumes that the size is equal or less, and it may result in a bad loop due to the underflow and eventually lead to Oops. The code of this function seems incorrectly assuming the usage of get_order(). We need to decrease at first, then align to power-of-two. Reported-and-tested-by: he, bo <bo.he@intel.com> Reported-by: zhang jun <jun.zhang@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Yet another Clevo P950 quirk entryTakashi Iwai2018-07-181-0/+1
| | | | | | | | | | | | | | | | | | The PCI SSID 1558:95e1 needs the same quirk for other Clevo P950 models, too. Otherwise no sound comes out of speakers. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1101143 Cc: <stable@vger.kernel.org> 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: usb-audio: quirks: Replace mdelay() with msleep() and usleep_range()Jia-Ju Bai2018-07-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | snd_usb_select_mode_quirk(), snd_usb_set_interface_quirk() and snd_usb_ctl_msg_quirk() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep() and usleep_range(). 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: sb: Proper endian notationsTakashi Iwai2018-07-271-15/+15
| | | | | | | | | | | | | | | | | | | | The data types defined in SB CSP driver code are all in little-endian, hence the proper type like __le32 should be used. Spotted by sparse, a warning like: sound/isa/sb/sb16_csp.c:330:14: warning: cast to restricted __le32 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: hda: Proper endian notations for BDL pointersTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | The BDL pointer used in snd_hdac_dsp_prepare() should be declared as __le32, as warned by sparse: sound/hda/hdac_stream.c:655:47: warning: incorrect type in argument 4 (different base types) sound/hda/hdac_stream.c:655:47: expected restricted __le32 [usertype] **bdlp sound/hda/hdac_stream.c:655:47: got unsigned int [usertype] **<noident> 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: xen: Use standard pcm_format_to_bits() for ALSA format bitsTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The open codes with the bit shift in xen_snd_front_alsa.c give sparse warnings as the PCM format type is with __bitwise. There is already a standard macro to get the format bits, so let's use it instead. This fixes sparse warnings like: sound/xen/xen_snd_front_alsa.c:191:47: warning: restricted snd_pcm_format_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sb: Fix sparse warning wrt PCM format typeTakashi Iwai2018-07-272-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 snd_sb_csp_autoload() with the proper snd_pcm_format_t type. This fixes the sparse warnings like: sound/isa/sb/sb16_csp.c:743:22: warning: restricted snd_pcm_format_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sb: Fix PCM format bit calculationTakashi Iwai2018-07-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | The PCM format type in snd_pcm_format_t can't be treated as integer implicitly since it's with __bitwise. We have already a helper function to get the bit index of the given type, and use it in each place instead. This fixes sparse warnings like: sound/isa/sb/sb16_main.c:61:44: warning: restricted snd_pcm_format_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: wss: Fix sparse warning wrt PCM format typeTakashi Iwai2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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 snd_wss_get_format() with the proper snd_pcm_format_t type. This fixes the sparse warnings like: sound/isa/wss/wss_lib.c:551:14: warning: restricted snd_pcm_format_t degrades to integer 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: ad1816a: Fix sparse warning wrt PCM format typeTakashi Iwai2018-07-271-1/+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 snd_ad1816a_get_format() with the proper snd_pcm_format_t type. This fixes the sparse warning like: sound/isa/ad1816a/ad1816a_lib.c:93:14: warning: restricted snd_pcm_format_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: pcm: Fix sparse warning wrt PCM format typeTakashi Iwai2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | The PCM format type is with __bitwise, hence it needs the explicit cast with __force. It's ugly, but there is a reason for that cost... This fixes the sparse warning: sound/core/oss/pcm_oss.c:1854:55: warning: incorrect type in argument 1 (different base types) 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: hda: Fix implicit PCM format type conversionTakashi Iwai2018-07-272-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | The PCM format type is defined with __bitwise, hence it can't be passed as integer but needs an explicit cast. In this patch, instead of the messy cast flood, define the format argument of snd_hdac_calc_stream_format() to be the proper snd_pcm_format_t type. This fixes sparse warnings like: sound/hda/hdac_device.c:760:38: warning: incorrect type in argument 1 (different base types) 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>
* | ALSA: emu10k1: Fix missing __force annotation for user/kernel pointer castTakashi Iwai2018-07-261-12/+12
| | | | | | | | | | | | | | | | | | | | The cast between user-space and kernel-space needs an explicit __force prefix, but it's missing in many places in emu10k1 driver code. Spotted by sparse as a warning like: sound/pci/emu10k1/emufx.c:529:33: warning: cast removes address space of expression Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: korg1212: Add __force annotation to cast in user-copy callbacksTakashi Iwai2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | The user-copy callbacks in korg1212 driver contain the explicit cast from a user pointer to a kernel pointer, but they missed __force prefix. It's mandatory for converting between them. Spotted by sparse, a warning like: sound/pci/korg1212/korg1212.c:1329:33: warning: cast removes address space of expression Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: pcm: Use standard lower_32_bits() and upper_32_bits()Takashi Iwai2018-07-261-4/+4
| | | | | | | | | | | | | | Instead of open codes, use the standard macros for obtaining the lower and upper 32bit values. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: pcm: Add __force to cast in snd_pcm_lib_read/write()Takashi Iwai2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The snd_pcm_lib_read() and snd_pcm_lib_write() inline functions have the explicit cast from a user pointer to a kernel pointer, but they lacks of __force prefix. This fixes sparse warnings like: ./include/sound/pcm.h:1093:47: warning: cast removes address space of expression Fixes: 68541213720d ("ALSA: pcm: Direct in-kernel read/write support") Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Declare the common variable in header fileTakashi Iwai2018-07-262-2/+2
| | | | | | | | | | | | | | | | | | | | Declare snd_usb_feature_unit_ctl properly in mixer.h. Otherwise it's error-prone. This fixes the sparse warning: sound/usb/mixer.c:1464:25: warning: symbol 'snd_usb_feature_unit_ctl' was not declared. Should it be static? Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opl3: Declare common variables properlyTakashi Iwai2018-07-266-10/+6
| | | | | | | | | | | | | | | | | | | | Move the declarations of common variables into opl3_voice.h instead of declaring at each file multiple times, which was error-prone. This fixes sparse warnings like: sound/drivers/opl3/opl3_synth.c:51:6: warning: symbol 'snd_opl3_regmap' was not declared. Should it be static? Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix a sparse warning about snd_ctl_elem_iface_tTakashi Iwai2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | The knew->iface field is in snd_ctl_elem_iface_t, which is with __bitwise, hence it can't be converted implicitly from integer. Give an explicit cast for the invalid type. Spotted by sparse: sound/pci/hda/hda_codec.c:3280:25: warning: restricted snd_ctl_elem_iface_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: msnd: Use NULL instead of 0Takashi Iwai2018-07-261-1/+1
| | | | | | | | | | | | | | Fix a sparse warning: sound/isa/msnd/msnd_pinnacle.c:813:1: warning: Using plain integer as NULL pointer Signed-off-by: Takashi Iwai <tiwai@suse.de>