summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-01-14sound: oss: vwsnd: avoid interruptible_sleep_onArnd Bergmann1-4/+10
Interruptible_sleep_on is racy and we want to remove it. This replaces the use in the vwsnd driver with an open-coded prepare_to_wait loop that fixes the race between concurrent open() and close() calls, and also drops the global mutex while waiting here, which restores the original behavior that was changed during the BKL removal. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14sound: oss: msnd_pinnacle: avoid interruptible_sleep_on_timeoutArnd Bergmann1-13/+18
We want to remove all sleep_on variants from the kernel because they are racy. In case of the pinnacle driver, we can replace interruptible_sleep_on_timeout with wait_event_interruptible_timeout by changing the meaning of a few flags used in the driver so they are cleared at wakeup time, which is a somewhat more appropriate way to do the same, although probably still racy. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: hda - Fix endless vmaster hook call in thinkpad_helper.cTakashi Iwai1-5/+5
The new vmaster hook, update_tpacpi_mute_led(), calls the original vmaster hook, but I forgot to save the original hook function but keep calling the updated one, which of course results in a stupid endless loop. Fixed now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: snd-usb: re-order some quirk entriesDaniel Mack1-86/+84
No code change, just a cosmetic cleanup to keep entries ordered by the device ID within a block of unique vendor IDs. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: usb-audio: Fix Creative VF0420 ratePavel Hofman1-2/+4
Creative Live! Cam Vista IM (VF0420) reports rate of 16kHz while working at 8kHz. The patch adds its USB ID to the existing quirk. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: usb-audio: Add support for Focusrite Saffire 6 USBEduard Gilmutdinov2-4/+45
Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14ALSA: hda - automute via amp instead of pinctl on some AIO modelsHui Wang1-3/+19
On some AIO (All In One) models with the codec alc668 (Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack, the system will switch the output to headphone and set the speaker to automute as well as change the speaker Pin-ctls from 0x40 to 0x00, this will bring loud noise to the headphone. I tried to disable the corresponding EAPD, but it did not help to eliminate the noise. According to Takashi's suggestion, we use amp operation to replace the pinctl modification for the automute, this really eliminate the noise. BugLink: https://bugs.launchpad.net/bugs/1268468 Cc: David Henningsson <david.henningsson@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13ALSA: hda - Apply codec power_filter to FG nodesTakashi Iwai4-29/+27
Apply the codec->power_filter to the FG nodes in general for reducing hackish set_power_state ops override in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13ALSA: hda - Don't set indep_hp flag for old AD codecsTakashi Iwai1-8/+8
Some old AD codecs don't like the independent HP handling, either it contains a single DAC (AD1981) or it mandates the mixer routing (AD1986A). This patch removes the indep_hp flag for such codecs. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68081 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-11ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masksTakashi Iwai1-0/+12
The PCI devices with DMA masks smaller than 32bit should enable CONFIG_ZONE_DMA. Since the recent change of page allocator, page allocations via dma_alloc_coherent() with the limited DMA mask bits may fail more frequently, ended up with no available buffers, when CONFIG_ZONE_DMA isn't enabled. With CONFIG_ZONE_DMA, the system has much more chance to obtain such pages. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-11ALSA: PCM: Warn when buffer preallocation failsTakashi Iwai1-0/+5
The failures of buffer preallocations at driver initializations aren't critical but it's still helpful to inform, so that user can know that something doesn't work as expected. For example, the recent page allocator change triggered regressions, but developers didn't notice until recently because the driver didn't complain. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-10ALSA: ctxfi - Work around emu20k1 glitch to prevent buffered sound data lossSarah Bessmer1-0/+5
Occasionally, on playback stream ringbuffer wraparound, the EMU20K1 hardware will momentarily return 0 instead of the proper current(loop) address. This patch handles that case, fixing the problem of playback position corruption and subsequent loss of buffered sound data, that occurs with some common buffering layout patterns(e.g. multiple simultaneous output streams with differently-sized or non-power-of-2-sized buffers). An alternate means of fixing the problem would be to read the ca register continuously, until two sequential reads return the same value; however, that would be a more invasive change, has performance implications, and isn't necessary unless there are also issues with the value not being updated atomically in regards to individual bits or something similar(which I have not encountered through light testing). I have no EMU20K2 hardware to confirm if the issue is present there, but even if it's not, this change shouldn't break anything that's not already broken. Signed-off-by: Sarah Bessmer <aotos@fastmail.fm> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: Merge memalloc code into snd-pcm moduleTakashi Iwai2-16/+4
Instead of keeping a separate snd-page-alloc module, merge into the core snd-pcm module, as we don't need to keep it as an individual module due to the drop of page reservation. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: Remove superfluous header inclusions in memalloc.cTakashi Iwai1-4/+0
After cutting off the proc and page reservation codes, we don't need many headers any longer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: Remove memory reservation code from memalloc helperTakashi Iwai7-321/+18
Nowadays we have CMA for obtaining the contiguous memory pages efficiently. Let's kill the old kludge for reserving the memory pages for large buffers. It was rarely useful (only for preserving pages among module reloading or a little help by an early boot scripting), used only by a couple of drivers, and yet it gives too much ugliness than its benefit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: Remove memory accounting in memalloc helperTakashi Iwai1-29/+2
It's almost superfluous, and doesn't help much for real uses. Let's reduce the layer size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codecMengdong Lin1-6/+9
Broadwell and Haswell have the same behavior on display audio. So this patch defines is_haswell_plus() to include codecs for both Haswell and its successor Broadwell, and apply all Haswell fix-ups to Broadwell. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: hda - add codec ID for Broadwell display audio codecMengdong Lin1-0/+2
This patch adds codec ID (0x80862808) and module alias for Broadwell display codec. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: hda - add device ID for Broadwell display audio controllerMengdong Lin1-0/+3
This patch adds the device ID for Intel Broadwell display HD-Audio controller, and applies Haswell properties to this device. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Split Thinkpad ACPI-related codeTakashi Iwai3-187/+105
Both patch_realtek.c and patch_conexant.c contain the fairy same code snippet for supporting Thinkpad ACPI LED controls. Split them into thinkpad_helper.c and include it from both places. Although this isn't the best approach from the code size POV, the probability for coexistence of both Realtek and Conexant codecs on a single machine is pretty low, thus it'll end up with less memory footprint than splitting to yet another module. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Don't create duplicated ctls for loopback pathsTakashi Iwai1-2/+4
AD1986A mic pins (0x1d and 0x1f) share the same widget for controlling the loopback volume/mute, but the generic parser didn't check it. This ended up with the duplicated controls for the same effect. This patch adds the check of the duplication for avoiding it. After this fix, there will be only one control although it affects both paths; this remaining issue should be fixed later in a different patch. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Correct AD1986A 3stack pin configsTakashi Iwai1-3/+3
The 3stack pin configs for AD1986A codec had incorrect values that resulted in broken mic and line-in. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Add consistent tag names for firmware patchTakashi Iwai1-9/+42
Some tags used in the firmware patch file are inconsistent with hwdep sysfs file names, such as, the firmware patch takes [hint] tag while sysfs file is */hints. This makes even me referring back to the document often. Let's provide the same tag names as sysfs for reducing confusions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - firmware patch code cleanupTakashi Iwai1-11/+10
Just a code refactoring: the need_codec flag in hda_patch_item struct can be removed by checking the current mode instead. No functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Increment default stream numbers for AMD HDMI controllersTakashi Iwai1-2/+2
It turned out that some AMD HDMI controllers still don't provide proper values in GCAP register (all zero), and the driver assigns only one stream in that case, although the connected codec chip supports more than one stream. In this patch, the default max number of streams for AMD HDMI controllers is increased to 8, which should suffice for most use cases. The overhead by this increase is more azx_dev struct and BDL allocations, so it's negligible. Of course, if the controller provides a proper GCAP register, the register value would be used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08ALSA: hda - Minor code optimization for patch_realtek.cTakashi Iwai1-12/+3
No functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-07ALSA: compress: add num_sample_rates in snd_codec_descVinod Koul1-0/+2
this gives ability to convey the valid values of supported rates in sample_rates array Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: compress: update struct snd_codec_desc for sample rateVinod Koul1-1/+2
Now that we don't use SNDRV_PCM_RATE_xxx bit fields for sample rate, we need to change the description to an array for describing the sample rates supported by the sink/source Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: compress: update comment for sample rate in snd_codecVinod Koul1-1/+2
Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: compress: remove the sample rate checkVinod Koul1-3/+0
commit f0e9c080 - "ALSA: compress: change the way sample rates are sent to kernel" changed the way sample rates are sent. So now we don't need to check for PCM_RATE_xxx in kernel Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: rme9652: fix a missing comma in channel_map_9636_ds[]Takashi Iwai1-1/+1
The lack of comma leads to the wrong channel for an SPDIF channel. Unfortunately this wasn't caught by compiler because it's still a valid expression. Reported-by: Alexander Aristov <aristov.alexander@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: cs5535audio: use named constants for pci_power_t valuesJulia Lawall1-1/+1
The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev; @@ pci_set_power_state(pdev, - 3 + PCI_D3hot ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: hda - Disable Front HP jack detection on Gigabyte Z87X-UD3HDavid Henningsson1-1/+11
This motherboard seems to have a flaky jack detection - when the front HP is not present, the jack state quickly switches on and off. This has been reported by three people in the bug, so I doubt it's a user error this time. BugLink: https://bugs.launchpad.net/bugs/1248116 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05Merge tag 'asoc-v3.14' of ↵Takashi Iwai450-5195/+9901
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.14 Not a lot going on framework wise, partly due to Christmas at least in the case of the work I've been doing, but there's been quite a lot of cleanup activity going on and the usual trickle of new drivers: - Update to the generic DMA code to support deferred probe and managed resources. - New drivers for BCM2835 (used in Raspberry Pi), Tegra with MAX98090 and Analog Devices AXI I2S and S/PDIF controller IPs. - Device tree support for the simple card, max98090 and cs42l52. - Conversion of the Samsung drivers to native dmaengine, making them multiplatform compatible and hopefully helping keep them more modern and up to date. - More regmap conversions, including a very welcome one for twl6040 from Peter Ujfalusi. - A big overhaul of the DaVinci drivers also from Peter Ujfalusi.
2014-01-05Merge branch 'for-linus' into for-nextTakashi Iwai544-2727/+5156
2014-01-02Merge remote-tracking branches 'asoc/topic/ad1836', 'asoc/topic/ad193x', ↵Mark Brown167-3718/+6682
'asoc/topic/adav80x', 'asoc/topic/adsp', 'asoc/topic/ak4641', 'asoc/topic/ak4642', 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/au1x', 'asoc/topic/axi', 'asoc/topic/bcm2835', 'asoc/topic/blackfin', 'asoc/topic/cs4271', 'asoc/topic/cs42l52', 'asoc/topic/da7210', 'asoc/topic/davinci', 'asoc/topic/ep93xx', 'asoc/topic/fsl', 'asoc/topic/fsl-mxs', 'asoc/topic/generic', 'asoc/topic/hdmi', 'asoc/topic/jack', 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/mxs', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/s6000', 'asoc/topic/sai', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/spear', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl6040', 'asoc/topic/txx9', 'asoc/topic/uda1380', 'asoc/topic/width', 'asoc/topic/wm8510', 'asoc/topic/wm8523', 'asoc/topic/wm8580', 'asoc/topic/wm8711', 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8741', 'asoc/topic/wm8750', 'asoc/topic/wm8753', 'asoc/topic/wm8776', 'asoc/topic/wm8804', 'asoc/topic/wm8900', 'asoc/topic/wm8901', 'asoc/topic/wm8940', 'asoc/topic/wm8962', 'asoc/topic/wm8974', 'asoc/topic/wm8985', 'asoc/topic/wm8988', 'asoc/topic/wm8990', 'asoc/topic/wm8991', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm9081' and 'asoc/topic/x86' into asoc-next
2014-01-02Merge remote-tracking branch 'asoc/topic/dt' into asoc-nextMark Brown2-6/+221
2014-01-02Merge remote-tracking branch 'asoc/topic/dma' into asoc-nextMark Brown6-21/+144
2014-01-02Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown1-4/+24
2014-01-02Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown6-35/+147
2014-01-02Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linusMark Brown2-64/+21
2014-01-02ASoC: ad1836: Reject unsupported bit sizesMark Brown1-0/+2
Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-02ASoC: ssm2518: Fix off-by-one error by ffs()Takashi Iwai1-4/+4
ffs() returns the bit position from 1, while the ssm2158 driver code assumes it being 0-based. Also, the bit mask computation of the two channel slots are incorrect; it must have worked just casually. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-01ASoC: simple-card: Add device's module clock selection.Xiubo Li1-3/+18
Try to get the device's module clock if the dt has no clocks and system-clock-frequency properties. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31ASoC: imx-spdif: Use snd-soc-dummy CODEC driver to link cardNicolin Chen2-64/+21
This is a quick fix for the below two issues when building spdif as modules. 1) If modprobing modules in order: (Step 1) snd-soc-fsl-spdif -> (Step 2) snd-soc-imx-spdif -> (Step 3) snd-soc-spdif-tx/rx, we will fail to create imx-spdif card and dai link unless we rmmod snd-soc-imx-spdif and modprobe it again due to the execution platform_driver_unregister() in probe() when meeting -EPROBE_DEFER at Step 2. 2) After "imx-spdif sound-spdif.17: dit-hifi <-> 2004000.spdif mapping ok", 'rmmod snd-soc-imx-spdif' would cause kernel dump with warning: WARNING: CPU: 0 PID: 1301 at /home/rmk/git/linux-rmk/fs/sysfs/dir.c:915 sysfs_hash_and_remove+0x84/0x90() sysfs: can not remove 'dapm_widget', no directory This should be caused by disordered resourse releasing of the whole link. And trying to unregister the card and then CODEC dev can't fix this issue. Thus this patch just provides a simple fix to these two bugs by using the snd-soc-dummy in the core instead of seperate snd-soc-spdif-tx/rx so that there's no need to handle the registering and unregistering of CODEC or CODEC dai any more. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31ASoC: core: Fix the DAI name getting.Xiubo Li1-3/+7
From "ASoC: make snd_soc_dai_link more symmetrical", can we see that the name of CPU DAI maybe omitted. If the DAI name is omitted, try to use the component name instead. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31ASoC: rsnd: add SRC (Sampling Rate Converter) supportKuninori Morimoto6-8/+248
This patch adds SRC support to Renesas sound driver. SRC converts sampling rate between codec <-> cpu. It needs special codec chip, or very simple DA/AD converter to use it. This patch was tested via ak4554 codec, and supports Gen1 only at this point. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31ASoC: rsnd: tidyup rsnd_ssi_master_clk_start() parameterKuninori Morimoto1-6/+4
Renesas sound has SRC (= Sampling Rate Converter), but, the HW implementation depends on its generation. It was part of SRU on Gen1, and SCU on Gen2. This SCU needs DMA transfer to use it. Current rsnd driver is using it as DMA transfer buffer (= no rate convert), and Gen1 is only supported at this point. This patch cleanup it with focusing about SRC and Gen2 part. ssi clock which is calculated from rsnd_ssi_master_clk_start() should have flexibility since Renesas sound has SRC (= Sampling Rate Converter). But current implementation is using runtime->rate directly. This patch tidyup rsnd_ssi_master_clk_start() parameter as preparation of future SRC support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31ASoC: rsnd: scu cleanup: add rsnd_scu_rate_ctrl()Kuninori Morimoto1-2/+2
Renesas sound has SRC (= Sampling Rate Converter), but, the HW implementation depends on its generation. It was part of SRU on Gen1, and SCU on Gen2. This SCU needs DMA transfer to use it. Current rsnd driver is using it as DMA transfer buffer (= no rate convert), and Gen1 is only supported at this point. This patch cleanup it with focusing about SRC and Gen2 part. rsnd_scu_set_hpbif() is renamed to rsnd_scu_rate_ctrl(), since its naming doesn't indicate the function meaning. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31ASoC: rsnd: INT_ENABLE is needed only Gen2Kuninori Morimoto2-3/+4
INT_ENABLE is needed only Gen2. rsnd_mod_write() do nothing on Gen1, but it is confusable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>