aboutsummaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2011-03-21ALSA: usb - Remove trailing spaces from USB card name stringsTakashi Iwai
Some USB devices give trailing spaces in strings returned from usb_string(). This confuses the automatic card-id creation, resulting always in "default". This patch fixes the behavior by removing trailing spaces. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-18sound: read i_size with i_size_read()Xiaochen Wang
Convert direct read of inode->i_size to using i_size_read(). i_size_read is guaranteed to return a valid value and its caller does not need to use addtional locking. Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-18Merge branch 'topic/misc' into for-linusTakashi Iwai
2011-03-18ALSA: sound/pci/asihpi: check adapter index in hpi_ioctlDan Rosenberg
The user-supplied index into the adapters array needs to be checked, or an out-of-bounds kernel pointer could be accessed and used, leading to potentially exploitable memory corruption. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-18ALSA: aloop - Fix possible IRQ lock inversionTakashi Iwai
loopback_pos_update() can be called in the timer callback, thus the lock held should be irq-safe. Otherwise you'll get AB/BA deadlock together with substream->self_group.lock. Reported-and-tested-by: Knut Petersen <Knut_Petersen@t-online.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-16Merge branch 'topic/hda' into for-linusTakashi Iwai
2011-03-16Merge branch 'topic/asoc' into for-linusTakashi Iwai
2011-03-16ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail()Nicolas Kaiser
Merge list_del() + list_add_tail() to list_move_tail(). Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-16Merge branch 'for-2.6.39' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc
2011-03-16ALSA: ctxfi - use list_move() instead of list_del()/list_add() combinationKirill A. Shutemov
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-16ALSA: firewire - msleep needs delay.hStephen Rothwell
fixes this error: sound/firewire/fcp.c: In function 'fcp_avc_transaction': sound/firewire/fcp.c:103: error: implicit declaration of function 'msleep' Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15ALSA: firewire-lib, firewire-speakers: handle packet queueing errorsClemens Ladisch
Add an AMDTP stream error state that occurs when we fail to queue another packet. In this case, the stream is stopped, and the error can be reported when the application tries to restart the PCM stream. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15ALSA: firewire-lib: allocate DMA buffer separatelyClemens Ladisch
For correct cache coherency on some architectures, DMA buffers must be allocated in a different cache line than data that is concurrently used by the CPU. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15ALSA: firewire-lib: use no-info SYT for packets without SYT sampleClemens Ladisch
In non-blocking mode, the SYT_INTERVAL is larger than the number of audio frames in each packet, so there are packets that do not contain any frame to which the SYT could be applied. For these packets, the SYT must not be the timestamp of the next valid SYT frame, but the special no-info SYT value. This fixes broken playback on the FireWave at 44.1 kHz. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driverClemens Ladisch
Add a driver for two playback-only FireWire devices based on the OXFW970 chip. v2: better AMDTP API abstraction; fix fw_unit leak; small fixes v3: cache the iPCR value v4: FireWave constraints; fix fw_device reference counting; fix PCR caching; small changes and fixes v5: volume/mute support; fix crashing due to pcm stop races v6: fix build; one-channel volume for LaCie v7: use signed values to make volume (range checks) work; fix function block IDs for volume/mute; always use channel 0 for LaCie volume Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Tested-by: Jay Fenlason <fenlason@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: hda - Remove an unused variable in patch_realtek.cTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecsVitaliy Kulikov
This patch replaces use of the harcoded arrays of pins, muxes, digital mics and adcs with the auto-generated ones using codec parsing and auto-discovers all actually connected digital mic pins on 92HD8X-like codecs This patch also adds the support for d-mic on pin 0x20. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: hda - fix digital mic selection in mixer on 92HD8X codecsVitaliy Kulikov
When the mux for digital mic is different from the mux for other mics, the current auto-parser doesn't handle them in a right way but provides only one mic. This patch fixes the issue. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: hda - Move default input-src selection to init partTakashi Iwai
Move the default input-src selection code for alc268/269 to the init part instead of the parser. The input-src selection might be overwritten by init verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: hda - Initialize special cases for input src in init phaseTakashi Iwai
Currently some special handling for the unusual case like dual-ADCs or a single-input-src is done in the tree-parse time in set_capture_mixer(). But this setup could be overwritten by static init verbs. This patch moves the initialization into the init phase so that such input-src setup won't be lost. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: ctxfi - Clear input settings before initializationPrzemyslaw Bruski
Clear input settings before initialization. Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: ctxfi - Fix SPDIF status retrievalPrzemyslaw Bruski
SDPIF status retrieval always returned the default settings instead of the actual ones. Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: ctxfi - Fix incorrect SPDIF status bit maskPrzemyslaw Bruski
SPDIF status mask creation was incorrect. Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14ALSA: ctxfi - Fix microphone boost codes/commentsPrzemyslaw Bruski
microphone boost was set at +12dB, not +20dB (like in Windows driver and in adc_conf structure declaration), some comments added. Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: atiixp - Fix wrong time-out checks during ac-link resetTakashi Iwai
The time-out in snd_atiixp_aclink_reset() is wrongly checked, and it resulted in exiting from the loop at the first iteration. Reported-by: Amir Shamsuddin <AmirS2+alsa@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: intel8x0m: append 'm' to "r_intel8x0"Paul Bolle
Appending an 'm' will distinguish it from a similar struct in intel8x0.c Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: intel8x0m: add 'm' as "suffix" to static functionsPaul Bolle
Adding an 'm' will distinguish them from identical names in intel8x0.c. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: intel8x0m: wait a bit before warm reset checkPaul Bolle
At every resume a laptop I use prints this message (at KERN_ERR level): ALSA sound/pci/intel8x0m.c:904: AC'97 warm reset still in progress? [0x2] The thing to note here is that 0x2 corresponds to ICH_AC97COLD. Ie, what seems to be happening is that the register involved indicated a warm reset for some time (as the ICH_AC97WARM bit was set) but by the time the warning is printed, and that same register is checked again, that bit is already cleared and only the ICH_AC97COLD bit is still set. It turns out a warm reset needs some time to settle, but it is currently checked right away. The test therefore fails the first time it is done and schedule_timeout_uninterruptible() will be called. Once we return from that jiffies is already (far) past end_time on this laptop, so we exit the loop, print a warning, and exit the function while the warm reset actually succeeded. A way to fix this is to call usleep_range() after writing to the register involved. A handful of tests suggest 500 usecs is a safe value. (This might punish the "finish cold reset" case, but on this laptop such a cold reset apparently never happens, so I can't say for sure.) While we're at it drop the extra single tick from end_time, as it looks rather silly. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: usbaudio: implement USB autosuspendOliver Neukum
Devices are autosuspended if no pcm nor midi channel is open Mixer devices may be opened. This way they are active when in use to play or record sound, but can be suspended while users have a mixer application running. [Small clean-ups using static inline by tiwai] Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11ALSA: usbaudio: fix suspend/resumeOliver Neukum
- ESHUTDOWN must be correctly handled - the optional interrupt endpoint's URB must be stopped and restarted Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11Merge branch 'fix/misc' into topic/miscTakashi Iwai
2011-03-11ASoC: Fix spacing in MAX8950Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-11ASoC: PXA: Z2: Fix codec pin nameVasily Khoruzhick
MONO was renamed to MONO1. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-03-11ASoC: PXA: z2: Mute internal speaker when headphones are connectedVasily Khoruzhick
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-11ASoC: Add MAX9850 codec driverChristian Glindkamp
This patch adds ASoC support for the MAX9850 codec with headphone amplifier. Supported features: - Playback - 16, 20 and 24 bit audio - 8k - 48k sample rates - DAPM Signed-off-by: Christian Glindkamp <christian.glindkamp@taskit.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-11ALSA: Add snd_ctl_activate_id()Takashi Iwai
Added a new API function snd_ctl_activate_id() for activate / inactivate the control element dynamically. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-10ALSA: hda: Prevent writing ICH6_PCIREG_TCSEL on AMD systemsAdam Lackorzynski
azx_init_pci() always writes PCI config register ICH6_PCIREG_TCSEL although this looks to be only defined on Intel systems and has a different meaning on AMD systems. On AMD systems the PCI interrupt pin control register is modified instead. Since the meaning of offset 0x44 in device specific configuration space is unknown for devices by other vendors, we only exclude AMD systems to retain the current behaviour. Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: HDA: Realtek ALC88x: Do not over-initialize speakers and hp that are ↵David Henningsson
primary outputs Do not initialize again the what has already been initialized as multi outs, as this breaks surround speakers. Tested-by: Bartłomiej Żogała <nusch88@gmail.com> Cc: <stable@kernel.org> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: HDA: Fixup unnecessary volume control index on Realtek ALC88xDavid Henningsson
Without this change, a volume control named "Surround" or "Side" would get an unnecessary index, causing it to be ignored by the vmaster and PulseAudio. Tested-by: Bartłomiej Żogała <nusch88@gmail.com> Cc: <stable@kernel.org> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: HDA: Fix volume control naming for surround speakers on Realtek ↵David Henningsson
auto-parser When more than one pair of internal speakers is present, allow names according to their channels. Tested-by: Bartłomiej Żogała <nusch88@gmail.com> Cc: <stable@kernel.org> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: HDA: Enable surround and subwoofer on Lenovo Ideapad Y530David Henningsson
The pin config values would change the association instead of the sequence, this commit fixes that up. Tested-by: Bartłomiej Żogała <nusch88@gmail.com> Cc: <stable@kernel.org> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: usb-audio - Add "cval->res = 384" quirk for Logitech Webcam C600Alexey Fisher
One more affected devices: Logitech Webcam C600 (046d:0808) Volume range before quirk is 6400, after (also real) is 16. Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10ALSA: usb-audio - Add volume range check and warn if it too bigAlexey Fisher
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10Merge branch 'for-2.6.38' into for-2.6.39Mark Brown
2011-03-09ASoC: Ensure WM8958 gets all WM8994 late revision widgetsMark Brown
Without this fix the driver won't instantiate properly on relevant devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-03-09ASoC: Fix typo in late revision WM8994 DAC2R nameMark Brown
Without this fix the driver won't instantiate properly on relevant devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-03-09sound: Use sound_register_*() for additional OSS minor devicesTakashi Iwai
Since OSS driver creates the device entries for /dev/audio* and /dev/dspW* by itself without coping with sound_core, it leads to conflicts with others and let sysfs spewing warnings. This patch rewrites the registration part of OSS driver to use the standard method also for additional minor devices. Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl) Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-09ASoC: Enable 192kHz sample rate for EP93xx.Alexander Sverdlin
Enable 192kHz sample rate for EP93xx. Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09ASoC: Improve EP93xx I2S clocks management.Alexander Sverdlin
Improve EP93xx I2S clocks management. Some freqs values are set not exact as they requested for MCLK and original code was not able to find divisors for SCLK and LRCLK. This code just picks up nearest value from 3 possible variants. This patch makes 44100 and 192000 rates working and fixes capture function (by selecting SCLK/LRCLK=64 where possible). All other rates should work as before. Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09ASoC: EDB93xx: Manage I2S rates according to datasheet for CS4271 CODEC.Alexander Sverdlin
Manage I2S rates according to datasheet for CS4271 CODEC in EDB93xx machine driver. Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>