summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: Echoaudio - Add suspend support #2Giuliano Pochini2010-02-153-78/+222
| | | | | | | | | | | | | | This patch adds rearranges parts of the initialization code and adds suspend and resume callbacks. This patch adds suspend and resume callbacks. It also rearranges parts of the initialization code so it can be used in both the first initialization (when the module is loaded we also have to load default settings) and the resume callback (where we have to restore the previous settings). Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Echoaudio - Add suspend support #1Giuliano Pochini2010-02-1515-80/+115
| | | | | | | | | | | | | | | | Move the controls init code outside the init_hw() function because is must not be called during resume. This patch moves the code that initializes the card's controls with default valued from the init_hw() function into a separated set_mixer_defaults() function (one for each of the 16 supported cards). This change is necessary because during resume we must resurrect the hardware without losing the previous settings. set_mixer_defaults() must be called only once when the module is loaded. Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Echoaudio - Add firmware cache #2Giuliano Pochini2010-02-152-4/+41
| | | | | | | | | | | | | | | This patch implements a simple cache for the firmware files when CONFIG_PM is defined. This patch changes get_firmware(), free_firmware() and adds free_firmware_cache(). The first two functions implement a very simple cache and the latter is used to actually release all the stored firmwares when the module is unloaded. When CONFIG_PM is not enabled those functions act as before, that is free_firmware() releases the firmware immediately and free_firmware_cache() does nothing. Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Echoaudio - Add firmware cache #1Giuliano Pochini2010-02-1518-65/+69
| | | | | | | | | | | | | Changes the way the firmware is passed through functions. When CONFIG_PM is enabled the firmware cannot be released because the driver will need it again to resume the card. With this patch the firmware is passed as an index of the struct firmware card_fw[] in place of a pointer. That same index is then used to locate the firmware in the firmware cache. Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge remote branch 'alsa/devel' into topic/miscTakashi Iwai2010-02-123-165/+273
|\
| * ALSA: usbmixer - add possibility to remap dB valuesJaroslav Kysela2010-02-112-55/+93
| | | | | | | | | | | | | | | | | | | | | | USB devices tends to represent dB ranges in different way than ALSA expects. Add possibility to override these values and add guessed values for SoundBlaster MP3+. Also rename 'Capture Input Source' control to 'Capture Source' for SoundBlaster MP3+ and Extigy. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
| * ALSA: dummy driver - add model parameterJaroslav Kysela2010-02-021-110/+180
| | | | | | | | | | | | | | 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>
* | sound: use DEFINE_PCI_DEVICE_TABLEAlexey Dobriyan2010-02-0967-70/+70
| | | | | | | | | | | | | | | | | | Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to .devinit.rodata section, so they can be discarded in some cases, and make them const. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ice1712: fix: lock samplerate when samplerate locking is enabledSebastien Alaiwan2010-02-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | I found that the sampling rate locking setting of the ice1712 sound driver was only half-respected : when the driver was locked to, let's say, 44100Hz, and a usermode app was requesting 48000Hz playback, the request was succesful although the soundcard would continue to run at 44100Hz. Here's a patch that will make those requests to fail. Signed-off-by: Sebastien Alaiwan <sebastien.alaiwan@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: trivial: sound seq ioctl dbg: print hexadecimal value padded with 0sThadeu Lima de Souza Cascardo2010-02-021-1/+1
| | | | | | | | | | | | | | | | Instead of padding with blanks and printing "number=0x a", print "number=0x0a". Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge remote branch 'alsa/devel' into topic/miscTakashi Iwai2010-02-012-6/+40
|\|
| * sound: control: fix minimum TLV lengthClemens Ladisch2010-02-011-1/+1
| | | | | | | | | | | | | | | | 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>
| * sound: control: actually allow TLV command accessClemens Ladisch2010-02-011-2/+3
| | | | | | | | | | | | | | | | | | 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>
| * ALSA: pcm_native - fix runtime->boundary calculationJaroslav Kysela2010-01-271-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote branch 'alsa/devel' into topic/miscTakashi Iwai2010-01-264-5/+18
|\|
| * ALSA: pcm_lib - return back hw_ptr_interruptJaroslav Kysela2010-01-263-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)Jaroslav Kysela2010-01-211-1/+10
| | | | | | | | | | | | | | 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>
* | ALSA: cs46xx: Fix cpu idling with resumeFlorian Zumbiehl2010-01-261-0/+10
| | | | | | | | | | | | | | | | | | Make sure that capture DMA doesn't stay enabled after system resume as that potentially prevents the processor from entering deep sleep states. Signed-off-by: Florian Zumbiehl <florz@florz.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/noncached-mmap' into topic/miscTakashi Iwai2010-01-216-2/+19
|\ \
| * | ALSA: pcm - Call pgprot_noncached() for vmalloc'ed buffersTakashi Iwai2010-01-186-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pgprot_noncached() can be set for vmalloc'ed buffers safely, and we'd need non-cached behavior more or less, even for the intermediate ring- buffers. Now snd_pcm_lib_mmap_vmalloc() is added as the common PCM mmap callback that is coupled with snd_pcm_lib_alloc_vmalloc_buffer() & co. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: pcm - Remove unneeded ifdef pgprot_noncachedTakashi Iwai2010-01-181-2/+0
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge remote branch 'alsa/devel' into topic/miscTakashi Iwai2010-01-213-10/+14
|\ \ \ | | |/ | |/|
| * | ALSA: pcm_core: Fix wake_up() optimizationJaroslav Kysela2010-01-213-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote branch 'alsa/devel' into topic/miscTakashi Iwai2010-01-188-15/+1291
|\| | | |/ |/|
| * sound: virtuoso: add Xonar DS supportClemens Ladisch2010-01-187-1/+1278
| | | | | | | | | | | | | | Add experimental support for the Asus Xonar DS. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
| * sound: seq_timer: simplify snd_seq_timer_set_tick_resolution() parametersClemens Ladisch2010-01-181-14/+13
| | | | | | | | | | | | | | | | | | 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>
* | ALSA: ctxfi - Add subsystem optionTakashi Iwai2010-01-143-10/+20
| | | | | | | | | | | | | | Added a new option "subsystem" to override the PCI SSID for identifying the card type. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Add snd_pci_quirk_lookup_id()Takashi Iwai2010-01-141-5/+27
| | | | | | | | | | | | | | | | Added a new function to look up a quirk entry with the given PCI SSID instead of a pci device pointer. This can be used when the searched ID is overridden for debugging or such a purpose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/miscTakashi Iwai2010-01-1313-183/+591
|\|
| * ALSA: pcm_lib - fix wrong delta print for jiffies checkJaroslav Kysela2010-01-131-3/+5
| | | | | | | | | | | | | | 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>
| * ALSA: hda - support OLPC XO-1.5 DC inputDaniel Drake2010-01-081-23/+190
| | | | | | | | | | | | | | | | | | | | 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>
| * ALSA: hda - Configure XO-1.5 microphones at capture timeDaniel Drake2010-01-081-40/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Merge branch 'topic/hda' of ↵Jaroslav Kysela2010-01-0844-359/+824
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel
| | * ALSA: hda: Refactor powerdown for Realtek HDA codecsDaniel T Chen2009-12-281-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * ALSA: hda: Add powerdown for Analog Devices HDA codecsDaniel T Chen2009-12-281-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * ALSA: hda - Use strict_strtoul()Takashi Iwai2009-12-272-24/+31
| | | | | | | | | | | | | | | | | | Rewrite the codes to use strict_strtoul() instead of simple_strtoul(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Add sanity check for storing the user-defined pin configsTakashi Iwai2009-12-271-0/+3
| | | | | | | | | | | | | | | | | | | | | Check whether the given NID is a pin widget before storing the user-defined pin configs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Fix click noises at suspend/free with Realtek codecsTakashi Iwai2009-12-271-0/+7
| | | | | | | | | | | | | | | | | | Call snd_hda_shutup_pins() at suspend and free for avoiding click noises. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Add snd_hda_shutup_pins() helper functionTakashi Iwai2009-12-273-11/+21
| | | | | | | | | | | | | | | | | | | | | 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>
| | * ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecsTakashi Iwai2009-12-261-0/+14
| | | | | | | | | | | | | | | | | | gpio_led, gpio_led_polarity and gpio_mute are added now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-12-2534-219/+160
| | |\
| | | * ALSA: hda - HDMI sticky stream tag supportWu Fengguang2009-12-251-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | ALSA: hda - Fix NID association for capture mixersTakashi Iwai2009-12-237-40/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-12-235-23/+141
| | |\ \
| | * | | ALSA: hda - Add Bass Speaker switch for HP dv7Takashi Iwai2009-12-221-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bass speaker is controlled via GPIO5. Tested-by: Wael Nasreddine <mla@nasreddine.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: hda - Check class to identify Nvidia controller chipsTakashi Iwai2009-12-181-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of listing all individual PCI IDs, check the matching with the PCI class together with the vendor id for Nvidia. This simplifies the pci id entries. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: hda - Fix NULL dereference in kctl-NID mapping in patch_realtek.cTakashi Iwai2009-12-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | capsrc_nids can be NULL, and adc_nids should be taken as fallback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-12-171-24/+282
| | |\ \ \
| | * \ \ \ Merge remote branch 'alsa/devel' into topic/hdaTakashi Iwai2009-12-1513-143/+455
| | |\ \ \ \
| * | | | | | ALSA: hda - conexant - Fixed microphone mixer for HP Compaq Presario F700Ken Prox2010-01-081-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>