summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2015-01-04ALSA: emux: Delete an unnecessary check before the function call "snd_sf_free"Markus Elfring
The snd_sf_free() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-04ALSA: oxygen: Delete an unnecessary check before the function call ↵Markus Elfring
"snd_pcm_suspend" The snd_pcm_suspend() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-04ALSA: emu10k1: Delete an unnecessary check before the function call "kfree"Markus Elfring
The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-04sound: oss: Deletion of unnecessary checks before the function call "vfree"Markus Elfring
The vfree() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-04ALSA: seq: Deletion of unnecessary checks before the function call ↵Markus Elfring
"snd_midi_event_free" The snd_midi_event_free() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: ps3: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()Lars-Peter Clausen
The ALSA core takes care that all preallocated memory is freed when the card (and the PCM) itself is freed. There is no need to do this manually in the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: oxygen: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()Lars-Peter Clausen
The ALSA core takes care that all preallocated memory is freed when the PCM itself is freed. There is no need to do this manually in the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: ymfpci: Remove always NULL parametersLars-Peter Clausen
The various PCM allocation functions in this driver take a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: trident: Remove always NULL parametersLars-Peter Clausen
The various PCM allocation functions in this driver take a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: sonicvibes: Remove always NULL parameterLars-Peter Clausen
snd_sonicvibes_pcm() take a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: riptide: Remove always NULL parameterLars-Peter Clausen
snd_riptide_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: ice1712: Remove always NULL parametersLars-Peter Clausen
The various PCM allocation functions in this driver take a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: fm801: Remove always NULL parameterLars-Peter Clausen
snd_fm801_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: emu10k1: Remove always NULL parametersLars-Peter Clausen
The various PCM and hwdep allocation functions in this driver take a pointer to a pointer of a PCM/hwdep where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: ens1370: Remove always NULL parametersLars-Peter Clausen
The various PCM and MIDI allocation functions in this driver take a pointer to a pointer of a PCM/MIDI object where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: cs46xx: Remove always NULL parametersLars-Peter Clausen
The various PCM and MIDI allocation functions in this driver take a pointer to a pointer of a PCM/MIDI object where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: cs4281: Remove always NULL parametersLars-Peter Clausen
snd_cs4281_pcm() and snd_cs4281_midi() take a pointer to a pointer of a PCM/MIDI object where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: asihpi: Remove always NULL parameterLars-Peter Clausen
snd_asihpi_hpi_new() takes a pointer to a pointer of a hwdep where if this parameter is provided the newly allocated hwdep is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ASLA: ad1889: Remove always NULL parameterLars-Peter Clausen
snd_ad1889_pcm_init() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: wss: Remove (almost) always NULL parametersLars-Peter Clausen
Most callers of snd_wss_pcm(), snd_wss_timer() and snd_cs4236_pcm() pass NULL as the last parameter, some callers pass a pointer but never use it after the function has been called and only a few callers pass a pointer and actually use it. The later is only the case for snd_wss_pcm() for snd_cs4236_pcm() and it is possible to get the same PCM object by accessing the pcm field of the snd_wss struct that was passed as the first parameter. This function removes the last parameters from the functions mentioned above and updates the callers which used it to use chip->pcm instead. This allows us to slightly simplify the functions since they don't have to check and set the last parameter anymore which makes the code slightly shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ASoC: sb16: Simplify snd_sb16dsp_pcm()Lars-Peter Clausen
All callers of snd_sb16dsp_pcm() always pass the pcm field of the first parameter as the last parameter. Simplify the function by moving this inside the function itself. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: sb8: Remove always NULL parametersLars-Peter Clausen
snd_sb8dsp_pcm() and snd_sb8dsp_midi() take a pointer to a pointer of a PCM/MIDI where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: msnd: Remove always NULL parameterLars-Peter Clausen
snd_msnd_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: gus: Remove always NULL parametersLars-Peter Clausen
snd_gf1_pcm_new() and snd_gf1_rawmidi_new() take a pointer to a pointer of a PCM/MIDI where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: es18xx: Remove always NULL parameterLars-Peter Clausen
snd_es18xx_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: es1688: Remove almost always NULL parameterLars-Peter Clausen
snd_es1688_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. This PCM is also available from the pcm field of the snd_es1688 struct that got passed to the same function. This patch updates all callers which passed a pointer to use that field instead and then removes the parameter from the function. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: ad1816a: Remove always NULL parametersLars-Peter Clausen
snd_ad1816a_pcm() and snd_ad1816a_timer() take a pointer to a pointer of a PCM/timer where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: ml403-ac97cr: Remove always NULL parameterLars-Peter Clausen
snd_ml403_ac97cr_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-31Merge branch 'topic/msbits' into for-nextTakashi Iwai
2014-12-31ASoC: pcm: Fix unused variable warningTakashi Iwai
sound/soc/soc-pcm.c: In function ‘soc_pcm_set_msb’: sound/soc/soc-pcm.c:307:11: warning: unused variable ‘i’ [-Wunused-variable] Fixes: 0e2a37513a1f ('ASoC: pcm: Use wildcard msbits constraints') Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-31ALSA: pcm: add SNDRV_PCM_TRIGGER_DRAIN triggerLibin Yang
Add SNDRV_PCM_TRIGGER_DRAIN trigger for pcm drain. Some audio devices require notification of drain events in order to properly drain and shutdown an audio stream. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-31ALSA: asihpi: fix an information leak in asihpi_hpi_ioctl()Eliot Blennerhassett
Add missing limits to keep copied data within allocated buffer. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30Merge branch 'topic/pcm-params' into for-nextTakashi Iwai
2014-12-30ALSA: snd_pcm_oss_period_size: Use round{up,down}_pow_of_two()Lars-Peter Clausen
Instead of opencoding them use the standard roundup_pow_of_two() and rounddown_pow_of_two() helper functions. This gets rids one of the few users of the custom ld2() function and also makes it a bit more obvious what the code does. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30Merge branch 'topic/msbits' into for-nextTakashi Iwai
2014-12-30ASoC: pcm: Use wildcard msbits constraintsLars-Peter Clausen
Use the new wildcard msbits constraints instead of installing a constraint for each available sample format width. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30ALSA: Add support for wildcard msbits constraintsLars-Peter Clausen
Currently the msbits constraints requires to specify a specific sample format width for which the constraint should be applied. But often the number of most significant bits is not sample format specific, but rather a absolute limit. E.g. the PCM interface might accept 32-bit and 24-bit samples, but the DAC has a 16-bit resolution and throws away the LSBs. In this case for both 32-bit and 24-bit format msbits should be set to 16. This patch extends snd_pcm_hw_constraint_msbits() so that a wildcard constraint can be setup that is applied for all formats with a sample width larger than the specified msbits. Choosing the wildcard constraint is done by setting the sample width parameter of the function to 0. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30ALSA: Fix handling of multiple msbits constraints on the same runtimeLars-Peter Clausen
If the sound card is made up of discrete components, each with their own driver (e.g. like in the ASoC case), we might end up with multiple msbits constraint rules installed. Currently this will result in msbits being set to whatever the last rule set it to. This patch updates the behavior of the rule to choose the minimum (other than zero) of all the installed rules. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-30Merge tag 'asoc-v3.19-rc2' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.20 Nothing too exciting here yet, a small optimization for DAPM from Lars-Peter and a few small bits and pieces for drivers but nothing that really stands out.
2014-12-30Merge tag 'asoc-fix-v3.19-rc2' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.19 A few fixes for v3.19, a few driver specifics and one core fix which fixes a boot crash on OMAP if deferred probing kicks in due to attempting to modify static data.
2014-12-27ALSA: atmel: fix building the ac97 driver for at91-multiplatformArnd Bergmann
at91 will no longer export the mach/cpu.h and mach/hardware.h header files in the future, which would break building the atmel ac97c driver. Since the cpu_is_* check is only used to find out whether we are running on avr32 or arm/at91, we can hardcode that check in the ARM case. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: http://www.spinics.net/lists/arm-kernel/msg382068.html Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-26ALSA: gus: Remove unused gus_instr.cTakashi Iwai
The instrument layer codes have been dropped years ago, but this file was left intentionally with a slight hope for the new implementations. But, looking at the reality, the probability we'll have a new code for ISA GUS board is very low, and I won't bet it. So, rather clean this legacy stuff up. Developers can still refer to the old code via git history. Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-26ALSA: hda - patch_analog.c: Remove some unused functionsRickard Strandqvist
Removes some functions that are not used anywhere: ad198x_ch_mode_get() ad198x_ch_mode_info() ad198x_ch_mode_info() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-26ALSA: ice1712: wm8776.c: Remove some unused functionsRickard Strandqvist
Removes some functions that are not used anywhere: snd_wm8776_set_master_mode() snd_wm8776_set_adc_if() snd_wm8776_set_dac_if() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-26ALSA: hda_intel: apply the Seperate stream_tag for SkylakeLibin Yang
The total stream number of Skylake's input and output stream exceeds 15, which will cause some streams do not work because of the overflow on SDxCTL.STRM field if using the legacy stream tag allocation method. This patch uses the new stream tag allocation method by add the flag AZX_DCAPS_SEPARATE_STREAM_TAG for Skylake platform. Signed-off-by: Libin Yang <libin.yang@intel.com> Reviewed-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-26ALSA: hda_controller: Separate stream_tag for input and output streams.Rafal Redzimski
Implemented separate stream_tag assignment for input and output streams. According to hda specification stream tag must be unique throughout the input streams group, however an output stream might use a stream tag which is already in use by an input stream. This change is necessary to support HW which provides a total of more than 15 stream DMA engines which with legacy implementation causes an overflow on SDxCTL.STRM field (and the whole SDxCTL register) and as a result usage of Reserved value 0 in the SDxCTL.STRM field which confuses HDA controller. Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com> Signed-off-by: Jayachandran B <jayachandran.b@intel.com> Signed-off-by: Libin Yang <libin.yang@intel.com> Reviewed-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-24Merge remote-tracking branches 'asoc/topic/samsung' and 'asoc/topic/wm8750' ↵Mark Brown
into asoc-next
2014-12-24Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/rockchip', ↵Mark Brown
'asoc/topic/rt5670' and 'asoc/topic/rt5677' into asoc-next
2014-12-24Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/intel' and ↵Mark Brown
'asoc/topic/omap' into asoc-next
2014-12-24Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown