aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-11-24ALSA: support module on-demand loading for seq and timerKay Sievers4-7/+22
If CONFIG_SND_DYNAMIC_MINORS is used, assign /dev/snd/seq and /dev/snd/timer the usual static minors, and export specific module aliases to generate udev module on-demand loading instructions: $ cat /lib/modules/2.6.33.4-smp/modules.devname # Device nodes to trigger on-demand module loading. microcode cpu/microcode c10:184 fuse fuse c10:229 ppp_generic ppp c108:0 tun net/tun c10:200 uinput uinput c10:223 dm_mod mapper/control c10:236 snd_timer snd/timer c116:33 snd_seq snd/seq c116:1 The last two lines instruct udev to create device nodes, even when the modules are not loaded at that time. As soon as userspace accesses any of these nodes, the in-kernel module-loader will load the module, and the device can be used. The header file minor calculation needed to be simplified to make __stringify() (supports only two indirections) in the MODULE_ALIAS macro work. This is part of systemd's effort to get rid of unconditional module load instructions and needless init scripts. Cc: Lennart Poettering <lennart@poettering.net> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: timer: automatically load the high-resolution timerClemens Ladisch1-2/+2
Increase the default timer limit so that snd-hrtimer.ko can be automatically loaded when needed, e.g., when used as the default sequencer timer. This replaces the check for the obsolete CONFIG_SND_HPET. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: pcm: optimize xrun detection in no-period-wakeup modeClemens Ladisch1-0/+2
Add a lightweight condition on top of the xrun checking so that we can avoid the division when the application is calling the update function often enough. Suggested-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: pcm: detect xruns in no-period-wakeup modeClemens Ladisch1-2/+16
When period wakeups are disabled, successive calls to the pointer update function do not have a maximum allowed distance, so xruns cannot be detected with the pointer value only. To detect xruns, compare the actually elapsed time with the time that should have theoretically elapsed since the last update. When the hardware pointer has wrapped around due to an xrun, the actually elapsed time will be too big by about hw_ptr_buffer_jiffies. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: oxygen: support for period wakeup disablingClemens Ladisch1-4/+10
Allow disabling period wakeup interrupts for all PCM streams. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: hda-intel: support for period wakeup disablingClemens Ladisch1-3/+6
Allow disabling period wakeup interrupts for HDA PCM streams. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: pcm: support for period wakeup disablingClemens Ladisch4-0/+13
This patch allows to disable period interrupts which are not needed when the application relies on a system timer to wake-up and refill the ring buffer. The behavior of the driver is left unchanged, and interrupts are only disabled if the application requests this configuration. The behavior in case of underruns is slightly different, instead of being detected during the period interrupts the underruns are detected when the application calls snd_pcm_update_avail, which in turns forces a refresh of the hw pointer and shows the buffer is empty. More specifically this patch makes a lot of sense when PulseAudio relies on timer-based scheduling to access audio devices such as HDAudio or Intel SST. Disabling interrupts removes two unwanted wake-ups due to period elapsed events in low-power playback modes. It also simplifies PulseAudio voice modules used for speech calls. To quote Lennart "This patch looks very interesting and desirable. This is something have long been waiting for." Support for this in hardware drivers is optional. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22Merge branch 'fix/misc' into topic/miscTakashi Iwai23-64/+120
2010-11-22ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52JDaniel T Chen1-0/+1
BugLink: https://launchpad.net/bugs/677652 The original reporter states that, in 2.6.35, headphones do not appear to work, nor does inserting them mute the A52J's onboard speakers. Upon inspecting the codec dump, it appears that the newly committed hp-laptop quirk will suffice to enable this basic functionality. Testing was done with an alsa-driver build from 2010-11-21. Reported-and-tested-by: Joan Creus Cc: <stable@kernel.org> [2.6.35+] Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: snd-atmel-abdac: test wrong variableVasiliy Kulikov1-1/+1
After clk_get() pclk is checked second time instead of sample_clk check. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timerAndreas Mohr1-8/+18
. Fix PulseAudio "ALSA driver bug" issue (if we have two alternated areas within a 64k DMA buffer, then max period size should obviously be 32k only). Back references: http://pulseaudio.org/wiki/AlsaIssues http://fedoraproject.org/wiki/Features/GlitchFreeAudio . In stop timer function, need to supply ACK in the timer control byte. . Minor log output correction When I did my first PA testing recently, the period size bug resulted in quite precisely observeable half-period-based playback distortion. PA-based operation is quite a bit more underrun-prone (despite its zero-copy optimizations etc.) than raw ALSA with this rather spartan sound hardware implementation on my puny Athlon. Note that even with this patch, azt3328 still doesn't work for both cases yet, PA tsched=0 and tsched (on tsched=0 it will playback tiny fragments of periods, leading to tiny stuttering sounds with some pauses in between, whereas with timer-scheduled operation playback works fine - minus some quite increased underrun trouble on PA vs. ALSA, that is). Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixupDaniel T Chen1-0/+1
BugLink: https://launchpad.net/bugs/677830 The original reporter states that the subwoofer does not mute when inserting headphones. We need an entry for his machine's SSID in the subwoofer pin fixup list, so add it there (verified using hda_analyzer). Reported-and-tested-by: i-NoD Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: HDA: Create mixers on ALC887David Henningsson1-2/+8
BugLink: http://launchpad.net/bugs/669092 ALC887 does not have any volume control ability on the mixer NIDs, so put the volume controls on the dac NIDs instead. Without this patch, ALC887 users cannot use alsamixer at all. Cc: stable@kernel.org Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdataJoe Perches1-1/+1
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: sound/core/pcm_lib.c: Remove unnecessary semicolonsJoe Perches1-1/+1
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: sound/ppc: Use printf extension %pR for struct resourceJoe Perches1-8/+4
Using %pR standardizes the struct resource output. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controlsDaniel T Chen1-0/+6
BugLink: https://launchpad.net/bugs/669279 The original reporter states: "The Master mixer does not change the volume from the headphone output (which is affected by the headphone mixer). Instead it only seems to control the on-board speaker volume. This confuses PulseAudio greatly as the Master channel is merged into the volume mix." Fix this symptom by applying the hp_only quirk for the reporter's SSID. The fix is applicable to all stable kernels. Reported-and-tested-by: Ben Gamari <bgamari@gmail.com> Cc: <stable@kernel.org> [2.6.32+] Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11ALSA: AT73C213: Rectify misleading comment.Peter Rosin1-1/+1
The Atmel SSC can divide by even numbers, not only powers of two. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11ALSA: sound/pci/ctxfi/ctpcm.c: Remove potential for use after freeJulia Lawall1-6/+10
In each function, the value apcm is stored in the private_data field of runtime. At the same time the function ct_atc_pcm_free_substream is stored in the private_free field of the same structure. ct_atc_pcm_free_substream dereferences and ultimately frees the value in the private_data field. But each function can exit in an error case with apcm having been freed, in which case a subsequent call to the private_free function would perform a dereference after free. On the other hand, if the private_free field is not initialized, it is NULL, and not invoked (see snd_pcm_detach_substream in sound/core/pcm.c). To avoid the introduction of a dangling pointer, the initializations of the private_data and private_free fields are moved to the end of the function, past any possible free of apcm. This is safe because the previous calls to snd_pcm_hw_constraint_integer and snd_pcm_hw_constraint_minmax, which take runtime as an argument, do not refer to either of these fields. In each function, there is one error case where apcm needs to be freed, and a call to kfree is added. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e,e1,e2,e3; identifier f,free1,free2; expression a; @@ *e->f = a ... when != e->f = e1 when any if (...) { ... when != free1(...,e,...) when != e->f = e2 * kfree(a) ... when != free2(...,e,...) when != e->f = e3 } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11ALSA: sound/mixart: avoid redefining {readl,write}_{le,be} accessorsFlorian Fainelli1-0/+10
If the platform already provides a definition for these accessors do not redefine them. The warning was caught on MIPS. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11ALSA: HDA: Enable digital mic on IDT 92HD87BDavid Henningsson1-2/+12
BugLink: http://launchpad.net/bugs/673075 According to the datasheet of 92HD87B, there is a digital mic at nid 0x11, so enable it in order to be able to use the mic. Cc: stable@kernel.org Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11sound/oss: Remove unnecessary casts of void ptrJesper Juhl3-7/+7
The [vk][cmz]alloc(_node) family of functions return void pointers which it's completely unnecessary/pointless to cast to other pointer types since that happens implicitly. This patch removes such casts from sound/oss/ Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11sound/oss/dev_table.c: Use vzallocJoe Perches1-4/+2
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03Merge branch 'fix/asoc' into for-linusTakashi Iwai9802-503113/+962630
2010-11-03ASoC: tpa6130a2: Get rid of compile warning from tpa6130a2_powerJarkko Nikula1-1/+1
Patch "ASoC: tpa6130a2: Fix unbalanced regulator disables" introduced a compiler warning "‘ret’ may be used uninitialized in this function". Initialize ret to zero to get rid of it and making sure that the function does not return any random error code when the code is falling through. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03ALSA: oxygen: add HiFier Serenade supportClemens Ladisch3-13/+16
Add support for the TempoTec/MediaTek HiFier Serenade sound card. The PCI ID was already there, but the driver handled it like the Fantasia model, which resulted in a dummy recording device. As a stereo output-only card, this model is to be handled exactly like the HG2PCI. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03ALSA: oxygen: reorganize PCI IDsClemens Ladisch1-8/+14
Sort the PCI IDs so that they make logical sense. Also move the card name comments into this list because the model symbols should be (more) self-explanationary. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asocTakashi Iwai2-12/+28
2010-11-03ALSA: oxygen: add Kuroutoshikou CMI8787-HG2PCI supportClemens Ladisch4-5/+18
Add support for the Kuroutoshikou CMI8787-HG2PCI sound card. [replaced non-latin letters in the patch by tiwai] Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03ALSA: oxygen: merge HiFier driver into snd-oxygenClemens Ladisch5-267/+42
The snd-hifier driver contains more duplicated code than model-specific code, so it does not make sense for it to be a separate driver. Handling the two-channel output restriction can be easily done in the generic driver. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-03Merge branch 'fix/misc' into topic/miscTakashi Iwai10-32/+45
2010-11-03ALSA: hda - MacBookAir3,1(3,2) alsa supportEdgar (gimli) Hucek1-0/+1
This patch add support for the MacBookAir3,1 and MacBookAir3,2 to the alsa sound system. Signed-off-by: Edgar (gimli) Hucek <gimli@dark-green.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-02Merge commit 'v2.6.37-rc1' into for-2.6.37Mark Brown9796-503090/+962593
2010-11-02ASoC: fix the building issue of missing codec field in 'struct snd_soc_card'Eric Miao1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-02ALSA: usb-audio - Support for Power/Status LED on Creative USB X-Fi S51Mandar Joshi1-2/+13
This patch adds support for Power/Status LED on Creative USB X-Fi S51. There is just one LED on the device. The LED can either be On or it can be set to Blink. There doesn't seem to be a way to switch it off. The control message to change LED status is similar to that of audigy2nx except that the index is to be set to 0 and value is 1 for Blink and 0 for On. The 'Power LED' control in alsamixer when muted will cause the LED to Blink continuously. When unmuted the LED will stay On. The Creative driver under Windows sets the LED to blink whenever audio is muted. This LED can be treated as the CMSS LED but I figured since there is just one LED, it should be treated as the Power LED. Is that alright? I've also changed the comment "Usb X-Fi" to "Usb X-Fi S51" as there are other external X-Fi devices from Creative like Usb X-Fi Go and Xmod. The volume knob and LED support patch doesn't apply to them. Signed-off-by: Mandar Joshi <emailmandar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-02ALSA: asihpi - Unsafe memory management when allocating control cacheJesper Juhl3-3/+13
I noticed that sound/pci/asihpi/hpicmn.c::hpi_alloc_control_cache() does not check the return value from kmalloc(), which may fail. If kmalloc() fails we'll dereference a null pointer and things will go bad fast. There are two memory allocations in that function and there's also the problem that the first may succeed and the second may fail and nothing is done about that either which will also go wrong down the line. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Eliot Blennerhassett <linux@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01ASoC: Update WARN uses in wm_hubsJoe Perches1-1/+1
Add missing newlines. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-01ASoC: Include cx20442 to SND_SOC_ALL_CODECSJarkko Nikula1-0/+1
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-01ASoC: Fix SND_SOC_ALL_CODECS typo for jz4740Jarkko Nikula1-1/+1
Include jz4740.c to SND_SOC_ALL_CODECS when the dependencies are met. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-01ASoC: Remove volatility from WM8900 POWER1 registerMark Brown1-6/+0
Not all bits can be read back from POWER1 so avoid corruption when using a read/modify/write cycle by marking it non-volatile - the only thing we read back from it is the chip revision which has diagnostic value only. We can re-add later but that's a more invasive change than is suitable for a bugfix. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
2010-11-01Linux 2.6.37-rc1Linus Torvalds1-2/+2
2010-11-01Merge branch 'for-linus' of git://www.jni.nu/crisLinus Torvalds2-8/+16
* 'for-linus' of git://www.jni.nu/cris: CRIS: Add paths for CRISv10 serial driver CRIS: Fix RS485 delay handling. Add missing "struct" to in sizeof.
2010-11-01Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds4-52/+73
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6: spi/pl022: fix erroneous platform data in U300 spi: fixed odd static string conventions in core code spi/bfin_spi: only request GPIO on first load spi/bfin_spi: handle error/status changes after data interrupts spi: enable spi_board_info to be registered after spi_master
2010-11-01CRIS: Add paths for CRISv10 serial driverJesper Nilsson1-0/+1
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2010-11-01ALSA: lx6464es - make 1 bit signed bitfield unsignedTim Blechmann3-4/+4
converts a 1 bit signed bitfield to an unsigned. Reported-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01ALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create()Jesper Juhl1-22/+11
When reading through sound/pci/cs46xx/dsp_spos.c I noticed a couple of things in cs46xx_dsp_spos_create(). It seems to me that we don't always free the various memory buffers we allocate and we also do some work (structure member assignment) early, that is completely pointless if some of the memory allocations fail and we end up just aborting the whole thing. I don't have hardware to test, so the patch below is compile tested only, but it makes the following changes: - Make sure we always free all allocated memory on failures. - Don't do pointless work assigning to structure members before we know all memory allocations, that may abort progress, have completed successfully. - Remove some trailing whitespace. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01ALSA: usb - driver neglects kmalloc return value check and may deref NULLJesper Juhl1-1/+3
sound/usb/pcm.c::snd_usb_pcm_check_knot() fails to check the return value from kmalloc() and may end up dereferencing a null pointer. The patch below (compile tested only) should take care of that little problem. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01spi/pl022: fix erroneous platform data in U300Linus Walleij1-1/+1
This fixes an erroneous use of LSB first in the U300 machine, the PL022 used in U300 is a standard ARM core that doesn't support this bit so it should never have been set. Cc: Kevin Wells <wellsk40@gmail.com>OA Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-10-31Input: ir-keytable - fix uninitialized variable warningDmitry Torokhov1-0/+2
We were forgetting to set up proper return value in success path causing ir_getkeycode() to fail intermittently: drivers/media/IR/ir-keytable.c: In function 'ir_getkeycode': drivers/media/IR/ir-keytable.c:363: warning: 'retval' may be used uninitialized in this function Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-31Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/stagingLinus Torvalds6-148/+196
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c-i801: Add PCI idents for Patsburg 'IDF' SMBus controllers i2c-i801: Handle multiple instances instead of keeping global state i2c-i801: Add Intel Patsburg device ID i2c: Drop unused I2C_CLASS_TV flags