summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2010-02-02ALSA: dummy driver - add model parameterJaroslav Kysela
This is a cleanup for the dummy driver. The model kernel module parameter is introduced to select the soundcard emulation. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-01sound: control: fix minimum TLV lengthClemens Ladisch
Allow TLV blocks that do not have any values; the smallest possible TLV is an empty container or one where the information is only in the tag. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-01sound: control: actually allow TLV command accessClemens Ladisch
Creating a control with TLV_COMMAND access was not possible because snd_ctl_new1() forgot to include it in the mask of allowable access bits. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-27ALSA: pcm_native - fix runtime->boundary calculationJaroslav Kysela
The code in pcm_lib updating runtime->hw_ptr_interrupt expects that runtime->boundary is divisible with runtime->period_size. Thanks are going to Clemens Ladisch for the notice. Fix the runtime->boundary calculation using buffer_size * period_size as base and find a least common multiple for 32bit platforms when the expression might overflow. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-26ALSA: pcm_lib - return back hw_ptr_interruptJaroslav Kysela
Clemens Ladisch noted for hw_ptr_removal in "cleanup & merge hw_ptr update functions" commit: "It is possible for the status/delay ioctls to be called when the sound card's pointer register alreay shows a position at the beginning of the new period, but immediately before the interrupt is actually executed. (This happens regularly on a SMP machine with mplayer.) When that happens, the code thinks that the position must be at least one period ahead of the current position and drops an entire buffer of data." Return back the hw_ptr_interrupt variable. The last interrupt pointer is always computed from the latest hw_ptr instead of tracking it separately (in this case all hw_ptr checks and modifications might influence also hw_ptr_interrupt and it is difficult to keep it consistent). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-21ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)Jaroslav Kysela
The SPDIF-input pin 0x1c is muted by default in hardware. Unmute appropriate pin to get captured samples instead zeros. Tested on Lenovo Thinkstation. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-21ALSA: pcm_core: Fix wake_up() optimizationJaroslav Kysela
This change fixes the "ALSA: pcm_lib - optimize wake_up() calls for PCM I/O" commit. New sleeping queue is introduced to separate user space and kernel space wake_ups. runtime->nowake is renamed to twake (transfer wake). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-18sound: virtuoso: add Xonar DS supportClemens Ladisch
Add experimental support for the Asus Xonar DS. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-18sound: seq_timer: simplify snd_seq_timer_set_tick_resolution() parametersClemens Ladisch
As snd_seq_timer_set_tick_resolution() is always called with the same three fields of struct snd_seq_timer, it suffices to give that as the only parameter. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-13ALSA: pcm_lib - fix wrong delta print for jiffies checkJaroslav Kysela
The previous jiffies delta was 0 in all cases. Use hw_ptr variable to store and print original value. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08ALSA: hda - support OLPC XO-1.5 DC inputDaniel Drake
The XO's audio hardware is wired up to allow DC sensors (e.g. light sensors, thermistors, etc) to be plugged in through the microphone jack. Add sound mixer controls to allow this mode to be enabled and tweaked. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08ALSA: hda - Configure XO-1.5 microphones at capture timeDaniel Drake
The XO-1.5 has a microphone LED designed to indicate to the user when something is being recorded. This light is controlled by the microphone bias voltage and it is currently coming on all the time. This patch defers the microphone port configuration until when recording is actually taking place, fixing the behaviour of the LED. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08Merge branch 'topic/hda' of ↵Jaroslav Kysela
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel
2010-01-08ALSA: hda - conexant - Fixed microphone mixer for HP Compaq Presario F700Ken Prox
Added patch for Hewlett-Packard Company Device Subsystem id - 103c:30ea. Signed-off-by: Ken Prox <kprox@users.sourceforge.net> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08ALSA: ac97_codec: merge WM9703 and WM9705 opsKrzysztof Helt
The WM9705 and WM9703 ops are the same actually so use the same code for both. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08ALSA: pcm_lib: fix "something must be really wrong" conditionJaroslav Kysela
When runtime->periods == 1 or when pointer crosses end of ring buffer, the delta might be greater than buffer_size. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07ALSA: pcm_lib - optimize wake_up() calls for PCM I/OJaroslav Kysela
As noted by pl bossart <bossart.nospam@gmail.com>, the PCM I/O routines (snd_pcm_lib_write1, snd_pcm_lib_read1) should block wake_up() calls until all samples are not processed. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07ALSA: pcm_lib - cleanup & merge hw_ptr update functionsJaroslav Kysela
Do general cleanup in snd_pcm_update_hw_ptr*() routines and merge them. The main change is hw_ptr_interrupt variable removal to simplify code logic. This variable can be computed directly from hw_ptr. Ensure that updated hw_ptr is not lower than previous one (it was possible with old code in some obscure situations when interrupt was delayed or the lowlevel driver returns wrong ring buffer position value). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07ALSA: pcm_lib - add possibility to log last 10 DMA ring buffer positionsJaroslav Kysela
In some debug cases, it might be usefull to see previous ring buffer positions to determine position problems from the lowlevel drivers. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-07ALSA: pcm_lib.c - convert second xrun_debug() parameter to use definesJaroslav Kysela
To increase code readability, convert send xrun_debug() argument to use defines. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-28ALSA: hda: Refactor powerdown for Realtek HDA codecsDaniel T Chen
This patch converts the alc889 Aspire-specific powerdown to a generic one. Like the previous effort, it currently only handles Front and PCM but can be easily extended to cover other nids. The existing hook for alc889 Aspire-specific remains enabled. Upon further testing, I've added its use for ALC861_AUTO as well. Following patches will enable them for other quirks. Tested-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28ALSA: hda: Add powerdown for Analog Devices HDA codecsDaniel T Chen
This patch ports powerdown fixes to AD198x. Currently we only turn off Front and HP for suspend, but this is easily extended for additional nids. Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27ALSA: hda - Use strict_strtoul()Takashi Iwai
Rewrite the codes to use strict_strtoul() instead of simple_strtoul(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27ALSA: hda - Add sanity check for storing the user-defined pin configsTakashi Iwai
Check whether the given NID is a pin widget before storing the user-defined pin configs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27ALSA: hda - Fix click noises at suspend/free with Realtek codecsTakashi Iwai
Call snd_hda_shutup_pins() at suspend and free for avoiding click noises. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27ALSA: hda - Add snd_hda_shutup_pins() helper functionTakashi Iwai
Add a common helper function for clearing pin controls before suspend. Use the pincfg array instead of looking through all widget tree. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-26ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecsTakashi Iwai
gpio_led, gpio_led_polarity and gpio_mute are added now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2009-12-25ALSA: hda - HDMI sticky stream tag supportWu Fengguang
When we run the following commands in turn (with CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0), speaker-test -Dhw:0,3 -c2 -twav # HDMI speaker-test -Dhw:0,0 -c2 -twav # Analog The second command will produce sound in the analog lineout _as well as_ HDMI sink. The root cause is, device 0 "reuses" the same stream tag that was used by device 3, and the "intelhdmi - sticky stream id" patch leaves the HDMI codec in a functional state. So the HDMI codec happily accepts the audio samples which reuse its stream tag. The proposed solution is to remember the last device each azx_dev was assigned to, and prefer to 1) reuse the azx_dev (and hence the stream tag) the HDMI codec last used 2) or assign a never-used azx_dev for HDMI With this patch and the above two speaker-test commands, HDMI codec will use stream tag 8 and Analog codec will use 5. The stream tag used by HDMI codec won't be reused by others, as long as we don't run out of the 4 playback azx_dev's. The legacy Analog codec will continue to use stream tag 5 because its device id is 0 (this is a bit tricky). Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23Merge branch 'fix/hda' into for-linusTakashi Iwai
2009-12-23Merge branch 'fix/asoc' into for-linusTakashi Iwai
2009-12-23Merge branch 'fix/misc' into for-linusTakashi Iwai
2009-12-23ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700Anisse Astier
Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23ASoC: Do not write to invalid registers on the wm9712.Eric Millbrandt
This patch fixes a bug where "virtual" registers were being written to the ac97 bus. This was causing unrelated registers to become corrupted (headphone 0x04, touchscreen 0x78, etc). This patch duplicates protection that was included in the wm9713 driver. Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2009-12-23ALSA: hda - Set mixer name after codec patchTakashi Iwai
Postpone the mixer name setup after the codec patch since the codec patch may change the codec name string in itself. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23ALSA: hda - Fix NID association for capture mixersTakashi Iwai
Fix the wrong implementation of NID <-> kctl mapping for capture mixers introduced by the ocmmit 5b0cb1d850c26893b1468b3a519433a1b7a176be. So far, the driver returns an error at probe. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2009-12-22ASoC: add missing parameter to mx27vis_hifi_hw_free()Guennadi Liakhovetski
Commit 2ccafed4 added an extra parameter to the DAI .set_pll() method, but it missed this call in sound/soc/imx/mx27vis_wm8974.c. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-22ASoC: sh: FSI:: don't check platform_get_irq's return value against zeroUwe Kleine-König
platform_get_irq returns -ENXIO on failure, so !irq was probably always true. Better use (int)irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-12-22ALSA: hda - Add Bass Speaker switch for HP dv7Takashi Iwai
The bass speaker is controlled via GPIO5. Tested-by: Wael Nasreddine <mla@nasreddine.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22ALSA: sound/core/pcm_timer.c: use lib/gcd.cFlorian Fainelli
Make sound/core/pcm_timer.c use lib/gcd.c Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22ALSA: hda - Add MSI blacklistTakashi Iwai
A machine with AMD CPU with Nvidia board doesn't work with MSI. Reported-by: Robert J. King <peritus@gurunetwork.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22ALSA: hda - Add support for the new 27 inch IMacsRafael Avila de Espindola
With the attached patch I am able to use the sound on a new IMac 27. What works: *) Internal speakers *) Internal microphone *) Headphone I don't have an external mic or a SPDIF device to test the rest. Signed-off-by: Rafael Avila de Espindola <rafael.espindola@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22ALSA: hda - Fix NULL dereference with enable_beep=0 optionTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21Merge branch 'fix/misc' into for-linusTakashi Iwai
2009-12-21Merge branch 'fix/asoc' into for-linusTakashi Iwai
2009-12-21Merge branch 'fix/hda' into for-linusTakashi Iwai
2009-12-21ALSA: sbawe: fix memory detectionKrzysztof Helt
Memory amount is increased before a successful write-read sequence is done. Thus, 512 kB of onboard memory is detected on memoryless cards like SB32. Move the increasing of memory counter after successful read is done. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21ALSA: fix incorrect rounding direction in snd_interval_ratnum()Krzysztof Helt
The direction of rounding is incorrect in the snd_interval_ratnum() It was detected with following parameters (sb8 driver playing 8kHz stereo file): - num is always 1000000 - requested frequency rate is from 7999 to 7999 (single frequency) The first loop calculates div_down(num, freq->min) which is 125. Thus, a frequency range's minimum value is 1000000 / 125 = 8000 Hz. The second loop calculates div_up(num, freq->max) which is 126 The frequency range's maximum value is 1000000 / 126 = 7936 Hz. The range maximum is lower than the range minimum so the function fails due to empty result range. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21Merge remote branch 'alsa/fixes' into fix/hdaTakashi Iwai