summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: nm256: Convert to new PCM copy opsTakashi Iwai2017-06-021-20/+37
| | | | | | | | | Replace the copy and the silence ops with the new ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es1938: Convert to the new PCM copy opsTakashi Iwai2017-06-021-8/+25
| | | | | | | | | Replace the copy ops with the new copy_user and copy_kernel ops. It's used only for a capture stream (for some hardware workaround), thus we need no silence operation. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dummy: Convert to new PCM copy opsTakashi Iwai2017-06-021-6/+14
| | | | | | | It's a dummy ops, so just replacing it. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Introduce copy_user, copy_kernel and fill_silence opsTakashi Iwai2017-06-022-15/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For supporting the explicit in-kernel copy of PCM buffer data, and also for further code refactoring, three new PCM ops, copy_user, copy_kernel and fill_silence, are introduced. The old copy and silence ops will be deprecated and removed later once when all callers are converted. The copy_kernel ops is the new one, and it's supposed to transfer the PCM data from the given kernel buffer to the hardware ring-buffer (or vice-versa depending on the stream direction), while the copy_user ops is equivalent with the former copy ops, to transfer the data from the user-space buffer. The major difference of the new copy_* and fill_silence ops from the previous ops is that the new ops take bytes instead of frames for size and position arguments. It has two merits: first, it allows the callback implementation often simpler (just call directly memcpy() & co), and second, it may unify the implementations of both interleaved and non-interleaved cases, as we'll see in the later patch. As of this stage, copy_kernel ops isn't referred yet, but only copy_user is used. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: include pcm_local.h and remove some extraneous tabsColin Ian King2017-05-301-6/+8
| | | | | | | | | | | | | | | We need to include pcm_local.h to clean up some smatch warnings: symbol 'snd_pcm_timer_done' was not declared. Should it be static? symbol 'snd_pcm_timer_init' was not declared. Should it be static? symbol 'snd_pcm_timer_resolution_change' was not declared. Should it be static? Also remove some extraneous tabs on empty lines and replace space intentation with a tab. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: declare snd_kcontrol_new structures as constBhumika Goyal2017-05-3014-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Cross compiled these files: sound/aoa/codecs/tas.c - powerpc sound/mips/{hal2.c/sgio2audio.c} - mips sound/ppc/{awacs.c/beep.c/tumbler.c} - powerpc sound/soc/sh/siu_dai.c - sh Could not find an architecture to compile sound/sh/aica.c. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: add local header file for snd-pcm moduleTakashi Sakamoto2017-05-265-0/+60
| | | | | | | | | | | | | | Several files are used to construct PCM core module, a.k.a snd-pcm. Although available APIs are described in 'include/sound/pcm.h', some of them are not exported as symbols in kernel space. Such APIs are just for module local usage. This commit adds module local header file and move some function prototypes into it so that scopes of them are controlled properly and developers get no confusion from unavailable symbols. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Call ack() whenever appl_ptr is updatedTakashi Iwai2017-05-251-9/+37
| | | | | | | | | | | | | | | | | | Although the ack callback is supposed to be called at each appl_ptr or hw_ptr update, we missed a few opportunities: namely, forward, rewind and sync_ptr. Formerly calling ack at rewind may have leaded to unexpected results due to the forgotten negative appl_ptr update in indirect-PCM helper, which is the major user of the PCM ack callback. But now we fixed this oversights, thus we can call ack callback safely even at rewind callback -- of course with the proper handling of the error from the callback. This patch adds the calls of ack callback in the places mentioned in the above. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: rme32: Deliver indirect-PCM transfer errorTakashi Iwai2017-05-251-6/+4
| | | | | | | Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: emu10k1: Deliver indirect-PCM transfer errorTakashi Iwai2017-05-251-2/+2
| | | | | | | Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: cs46xx: Deliver indirect-PCM transfer errorTakashi Iwai2017-05-251-4/+4
| | | | | | | Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: mips: Deliver indirect-PCM transfer errorTakashi Iwai2017-05-251-8/+6
| | | | | | | Now that the indirect-PCM transfer helper gives back an error, we should return the error from ack callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sb: remove needless evaluation in implementation for copy callbackTakashi Sakamoto2017-05-241-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | In design of ALSA pcm core, 'struct snd_pcm_ops.copy' is expected to copy PCM frames, according to frame alignment on intermediate buffer for userspace and dedicated buffer for data transmission. In this callback, value of 'channel' argument depends on the frame alignment, which drivers registers to runtime of PCM substream. When target devices can handle non-interleaved buffer, this value has positive value, otherwise negative. ALSA driver for PCM component of EMU8000 chip is programmed with local macro to switch the frame alignment. The 'copy' operation in non-interleaved side has evaluation of the 'channel' argument (actually it's 'voice' argument). This is useless. This commit remove the evaluation. [tiwai: the negative channel argument was the inheritance from the old code where -1 was meant for interleaved mode. The mix-up was dropped meanwhile, thus it's correct to assume that we receive no longer -1 there, and it's safe to cleanup the relevant code. Also, voice=0 for channel==1 is trivial, and it can be dropped, too.] Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: remove unused local flagTakashi Sakamoto2017-05-241-27/+22
| | | | | | | | | | | | ALSA driver series for devices of Gravis Ultra Sound includes local variable 'snd_gf1_pcm_use_dma'. Although this is a flag to change behaviours of local implementations for 'struct snd_pcm_ops.copy' and 'struct snd_pcm_ops.silence', it's invariable during module lifetime. This commit removes this local variable and the relevant operations. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: control: remove entry limitation for list operationTakashi Sakamoto2017-05-241-3/+1
| | | | | | | | | | | | | | | In current implementation of ALSA control core, list operation has a limitation to handle 16384 entries at once. This seems due to allocation in kernel space to copy data from user space. With a commit 53e7bf452584 ("ALSA: control: Simplify snd_ctl_elem_list() implementation"), for the operation, ALSA control core copies data into user space directly. No need to care of kernel spaces anymore. This commit purges the limitation. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: info: Use kvzalloc() for a temporary write bufferTakashi Iwai2017-05-231-3/+3
| | | | | | | | | | | We used to use kmalloc (more exactly, krealloc()) for creating and growing the temporary buffer for text proc write. It can grow up to 16kB, and it's already a bit doubtful whether it's always safe to use kmalloc(). With the recent addition of kvmalloc(), we can have a better chance for succeed of memory allocation, so let's switch to that new API. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Remove set_fs() in PCM core codeTakashi Iwai2017-05-232-47/+67
| | | | | | | | | | | | | | | | | | | | | PCM core code has a few usages of set_fs(), mostly for two codepaths: - The DELAY ioctl call from pcm_compat.c - The ioctl wrapper in kernel context for PCM OSS and other This patch removes the set_fs() usage in these places by a slight code refactoring. For the former point, snd_pcm_delay() is changed to return the value directly instead of putting the value to the given address. Each caller stores the result in an appropriate manner. For fixing the latter, snd_pcm_lib_kernel_ioctl() is changed to call the functions directly as well. For achieving it, now the function accepts only the limited set of ioctls that have been used, so far. The primary user of this function is the PCM OSS layer, and the only other user is USB UAC1 gadget driver. Both drivers don't need the full set of ioctls. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: control: Simplify snd_ctl_elem_list() implementationTakashi Iwai2017-05-231-42/+24
| | | | | | | | | | | | | | | | | | | | This patch simplifies the code of snd_ctl_elem_list() in the following ways: - Avoid a vmalloc() temporary buffer but do copy in each iteration; the vmalloc buffer was introduced at the time we took the spinlock for the ctl element management. - Use the standard list_for_each_entry() macro - Merge two loops into one; it used to be a loop for skipping until offset becomes zero and another loop to copy the data. They can be folded into a single loop easily. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire: remove support for 16 bit PCM samples in playback substreamTakashi Sakamoto2017-05-2212-227/+9
| | | | | | | | | | | | | | | | | | | | | | | | | In IEC 61883-6, AM824 is described as format of data block. In this format, one data block consists of several data channels, which is aligned to 32 bit. One data channel has 8 bit label field and 24 bit data field. PCM frames are transferred in Multi Bit Linear Audio (MBLA) data channel. This channel can include 16/20/24 bit PCM sample. As long as I know, models which support IEC 61883-1/6 doesn't allow to switch bit length of PCM sample in MBLA data channel. They always transmit/receive PCM frames of 24 bit length. This can be seen for the other models which support protocols similar to IEC 61883-1/6. On the other hand, current drivers for these protocols supports 16 bit length PCM sample in playback substream. In this case, PCM sample is put into the MBLA data channel with 8 bit padding in LSB side. Although 16 bit PCM sample is major because it's in CD format, this doesn't represent device capability as is. This commit removes support for 16 bit PCM samples in playback substream. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: mixart: constify snd_kcontrol_new structuresBhumika Goyal2017-05-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: cs46xx: constify snd_kcontrol_new structuresBhumika Goyal2017-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ice1712: constify snd_kcontrol_new structuresBhumika Goyal2017-05-212-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sound/isa: constify snd_kcontrol_new structuresBhumika Goyal2017-05-215-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare snd_kcontrol_new structures as const as they are only passed an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having this property can be made const. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct snd_kcontrol_new x@p={...}; @ok@ identifier r.x; position p; @@ snd_ctl_new1(&x@p,...) @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct snd_kcontrol_new x; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Simplify forward/rewind codesTakashi Iwai2017-05-211-68/+50
| | | | | | | | Factor out the common codes in snd_pcm_*_forward() and *_rewind() functions to simplify the codes. No functional changes. Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: Use a common helper for PCM state check and hwsyncTakashi Iwai2017-05-211-118/+35
| | | | | | | | | | | | | The mostly same codes for checking the current PCM state and calling hwsync are found in a few places. This patch simplifies them by creating a common helper function. It also fixes a couple of cases where we missed the proper state check (e.g. PAUSED state wasn't handled in rewind and snd_pcm_hwsync()), too. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm/oss: mark snd_pcm_plug_slave_format arg as constArnd Bergmann2017-05-181-1/+1
| | | | | | | | | | | | | | | | Only one of the two declarations has the const modifier in the argument list, so we get a warning when CONFIG_SND_PCM_OSS_PLUGINS is disabled: sound/core/oss/pcm_oss.c: In function 'snd_pcm_oss_change_params': sound/core/oss/pcm_oss.c:898:47: error: passing argument 2 of 'snd_pcm_plug_slave_format' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] This makes the two declarations match again. Fixes: e76bf3c4b4e4 ("ALSA: pcm/oss: refer to parameters instead of copying to reduce usage of kernel stack") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: use "do {} while (0)" for empty macroArnd Bergmann2017-05-181-1/+1
| | | | | | | | | | | | | | | Recent compilers produce a harmless warning for the new pcm_call_notify() macro when CONFIG_SND_PCM_OSS is disabled: sound/core/pcm.c: In function 'snd_pcm_free': sound/core/pcm.c:905:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] This turns the empty macro into a 'do {} while (0)' statement to avoid the warning. Fixes: 58f30d650c7f ("ALSA: pcm: Build pcm notifier code conditionally") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: constify function local and read-only tableTakashi Sakamoto2017-05-171-2/+3
| | | | | | | | | | | In a function snd_pcm_hw_params_choose(), target parameters are arranged into a table. Though each entry of this table is read-only, they don't have const qualifier. This commit adds the qualifier. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm/oss: refer to parameters instead of copying to reduce usage of ↵Takashi Sakamoto2017-05-173-11/+12
| | | | | | | | | | | | | | kernel stack Some functions in compatibility layer for Open Sound System interface has local variable to copy some parameters in runtime of PCM substream, while this can be replaced with reference of pointers to parameter itself. This brings an advantage to reduce usage of kernel stack. This commit applies this idea. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: use helper function to refer parameter as read-onlyTakashi Sakamoto2017-05-174-8/+10
| | | | | | | | | | ALSA pcm core has hw_param_interval_c() to pick up parameter with const qualifier for safe programming. This commit applies it to the cases. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: add const qualifier for read-only table for sampling rateTakashi Sakamoto2017-05-171-2/+4
| | | | | | | | | | | There's a read-only table for each sampling rate, while it doesn't have const qualifier and can be modified. This commit add the qualifier. As a result, a symbol for the table moves from .data section to .rodata. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/avr32-removal' into for-nextTakashi Iwai2017-05-174-998/+74
|\
| * ALSA: atmel: Remove AVR32 bits from the driverAndy Shevchenko2017-05-154-998/+74
| | | | | | | | | | | | | | | | | | AVR32 is gone. Now it's time to clean up the driver by removing leftovers that was used by AVR32 related code. Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Enable build with m68kTakashi Iwai2017-05-171-2/+2
| | | | | | | | | | | | | | | | | | By some reason in the ancient history, we disabled the build of ALSA drivers for m68k. Since we'd like to move sound/oss/dmasound stuff into ALSA for the complete drop of the legacy OSS stuff, let's try to start building with m68k. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: emu10k1: Get rid of set_fs() usageTakashi Iwai2017-05-171-54/+73
| | | | | | | | | | | | | | | | Instead of set_fs() hackery, do the straight memcpy() by passing a flag indicating the kernel space operation. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opl3: Kill unused set_fs()Takashi Iwai2017-05-171-14/+0
| | | | | | | | | | | | | | | | snd_enter_user() and snd_leave_user() that call set_fs() are the dead code in opl3 driver. Let's rip them off. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove superfluous header inclusionsTakashi Iwai2017-05-171-2/+0
| | | | | | | | | | Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix a typo in commentTakashi Iwai2017-05-171-1/+1
| | | | | | | | | | Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove the use of set_fs()Takashi Iwai2017-05-171-28/+31
| | | | | | | | | | | | | | | | | | | | set_fs() is used in HD-audio vmaster code to retrieve the TLV data of each slave kctl. Since the slave is supposed to be a standard amp kctl, we can call directly the supposed tlv callback instead of the indirect call, so that we can remove the set_fs() hack. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove the generic bind ctl helpersTakashi Iwai2017-05-172-168/+0
| | | | | | | | | | | | | | | | Now all the users of this workaround code is gone, and we can finally remove the legacy codes from the core HD-audio module. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Move bind-mixer switch codes to generic parserTakashi Iwai2017-05-173-85/+44
| | | | | | | | | | | | | | | | The generic parser is the only user of the bind-mixer controls, so we can move the code there and clean up the core helper. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Simplify bound-beep mute control for ALC268Takashi Iwai2017-05-171-9/+28
| | | | | | | | | | | | | | | | | | | | | | The beep mute switch for ALC268 needs to touch two NIDs, and we used to apply the bind-mixer stuff. But the use case for ALC268 is fairly easy to convert to an open-code in a shorter form. Since this is the only user of the bind-ctls, we can clean up the common helper codes later. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: cs4281: Fix the leftover commentTakashi Iwai2017-05-171-1/+1
| | | | | | | | | | | | | | The comment at endif line was forgotten to be corrected when the condition was converted to IS_REACHABLE(). Fix it, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sb: Use IS_REACHABLE()Takashi Iwai2017-05-172-2/+2
| | | | | | | | | | | | | | Replace the complex ifdef conditions with IS_REACHABLE() macro. No functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opl4: Use IS_REACHABLE()Takashi Iwai2017-05-172-3/+3
| | | | | | | | | | | | | | | | | | Rewrite the complex ifdef condition with IS_REACHABLE(). The ifdef in opl4_local.h was without defined(MODLE) check, but this is likely the oversight. Use IS_REACHABLE() here as well. Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: cmi8238: Use IS_ENABLED()Takashi Iwai2017-05-171-1/+1
| | | | | | | | | | | | | | Simplify the ifdef conditions with IS_ENABLED() macro. No functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: pcm: Build pcm notifier code conditionallyTakashi Iwai2017-05-171-13/+20
| | | | | | | | | | | | | | The PCM notifier code is used only by OSS emulation layer, so we can build it conditionally for reducing the size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ak411x: Use array instead of offsetof()Takashi Iwai2017-05-173-36/+33
| | | | | | | | | | | | | | | | The ak4113, ak4114 and ak4117 i2c drivers have some tricky codes to access the struct fields in the callback. This can be simplified by replacing the struct fields with the array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: vxpocket: Use container_of()Takashi Iwai2017-05-174-21/+23
| | | | | | | | | | | | | | | | The vxpocket driver is using the explicit cast from the parent class pointer, but it'll be broken when the structure field randomization is applied. Use container_of() in a modern manner, instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: vx222: Use container_of()Takashi Iwai2017-05-153-15/+17
| | | | | | | | | | | | | | | | The vx222 driver is using the explicit cast from the parent class pointer, but it'll be broken when the structure field randomization is applied. Use container_of() in a modern manner, instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud