summaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2015-01-02ALSA: asihpi: Remove always NULL parameterLars-Peter Clausen1-7/+2
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 Clausen1-8/+2
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 Clausen16-64/+48
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 Clausen4-9/+5
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 Clausen4-13/+5
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 Clausen3-7/+3
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 Clausen6-17/+9
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 Clausen1-8/+2
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 Clausen3-10/+5
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 Clausen2-10/+4
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 Clausen1-7/+2
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 Iwai1-1/+1
2014-12-31ASoC: pcm: Fix unused variable warningTakashi Iwai1-1/+1
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 Yang1-1/+9
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 Blennerhassett2-2/+7
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 Iwai1-3/+3
2014-12-30ALSA: snd_pcm_oss_period_size: Use round{up,down}_pow_of_two()Lars-Peter Clausen1-3/+3
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 Iwai2-22/+17
2014-12-30ASoC: pcm: Use wildcard msbits constraintsLars-Peter Clausen1-20/+4
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 Clausen1-1/+12
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 Clausen1-1/+1
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 Iwai19-208/+347
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 Iwai9-40/+52
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 Bergmann1-3/+3
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 Iwai1-172/+0
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 Strandqvist1-33/+0
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 Strandqvist2-18/+0
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 Yang1-1/+4
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 Redzimski2-2/+23
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 Brown2-2/+1
into asoc-next
2014-12-24Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/rockchip', ↵Mark Brown4-18/+220
'asoc/topic/rt5670' and 'asoc/topic/rt5677' into asoc-next
2014-12-24Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/intel' and ↵Mark Brown7-53/+46
'asoc/topic/omap' into asoc-next
2014-12-24Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown2-0/+8
2014-12-24Merge remote-tracking branch 'asoc/topic/pcm' into asoc-nextMark Brown1-3/+4
2014-12-24Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown2-92/+16
2014-12-24Merge remote-tracking branches 'asoc/fix/dwc', 'asoc/fix/intel', ↵Mark Brown8-31/+47
'asoc/fix/rockchip' and 'asoc/fix/rt5677' into asoc-linus
2014-12-24Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linusMark Brown1-9/+5
2014-12-24ASoC: rockchip: i2s: set TDL and RDL to 16 samplesJianqun Xu1-0/+4
Set Transmit Data Level(TDL) and Receive Data Level(RDL) to 16 samples. Without this setting, the TDL is default to be 0x00 (means 0 sample), and the RDL is default to be 0x1f (means 32 samples). Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: rockchip: i2s: fix maxburst of dma data to 4Jianqun Xu1-2/+2
Since RK3288 DMAC's burst length only support max to 4, here set maxburst of playback and capture dma data to 4. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: rockchip: i2s: fix error defination of transmit data levelJianqun Xu1-1/+1
According to description about "Transmit Data Level", This bit field controls the level at which a DMA request is made by the transmit logic. It is equal to the watermark level. That is, the dma_tx_req signal is generated when the number of valid data entries in the TXFIFO (TXFIFO0 if CSR=00 TXFIFO1 if CSR=01 TXFIFO2 if CSR=10 TXFIFO3 if CSR=11) is equal to or below this field value. Different to receive data level, transmit data level does not need to "-1". Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: rt5677: Adjust the routing of "PLL1"Oder Chiou1-11/+7
Remove the duplicated PLL1 connections of the adc stereo filters, and remove the PLL1 connections of the DACs because the PLL1 should be connected to dac filters. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: rt5677: Add the ASRC supportOder Chiou1-0/+155
Add the ASRC support Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: rt5677: Revise the filter powersOder Chiou1-6/+16
Add the filter powers of the dac mono3 and mono4, and remove the connection of dac stereo1 filter that connect to DAC1 MIX. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: Intel: Store the entry_point read from FW fileJie Yang1-0/+1
To enable some modules from other than base FW, according to FW interface spec, we need pass the correct entry point param to FW, so here store the entry_point read from FW file for later usage. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: Intel: correct the fixed free block allocationJie Yang1-1/+5
For block span more than 1 section, when allocate it from a free block, we need allocate the remain buffers within the block, and then continue alloc the rest of needed size buffer. Here also make sure this free block is moved from free list to used list, and add it to block_list which may be used for power gating disabling later. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: pcm: Fix vague codec and cpu DAI prepare error messagesJarkko Nikula1-3/+4
Both codec and cpu DAI prepare print the same error message making it a bit more difficult to grep quickly from sources. Fix this by telling it explicitly. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24ASoC: rt5677: fixed rt5677_dsp_vad_put rt5677_dsp_vad_get panicFang, Yang A1-4/+5
snd_kcontrol_chip should return snd_soc_component instead of snd_soc_codec Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-22ASoC: rt5670: Keep sysclk on if JD func is usedBard Liao1-0/+11
System clock is necessary for rt5670 JD function. We assume system clock source will be set in machine driver. So there are two things left we should do in codec driver. 1. Set sysclk to codec internal clock in probe since machine driver may not do that before JD function is registered. 2. Power up PLL once sysclk source is switched to PLL. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-22ASoC: rt5670: Add runtime PM supportBard Liao1-0/+9
This patch adds runtime PM support on rt5670 codec. Signed-off-by: Lin Mengdong <mengdong.lin@intel.com> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-22ASoC: Intel: fix sparse non static symbol warningsWei Yongjun1-2/+2
Fixes the following sparse warnings: sound/soc/intel/sst/sst_acpi.c:248:5: warning: symbol 'sst_acpi_probe' was not declared. Should it be static? sound/soc/intel/sst/sst_acpi.c:335:5: warning: symbol 'sst_acpi_remove' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@kernel.org>