summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2010-05-13[tegra ALSA] Updating sndfx header fileVijay Mali
In order to keep sndfx file in sync with audiofx header file updating tegra_sndfx.h with structures and definitions, made the corresponding changes in code. Verified both playback and record are working fine. For bug 686588 synopsis: Incosistent kernel panic while running ALSA decode tests Change-Id: Idc121a467a7c5460d0aa68416232d07b539b2a45 Reviewed-on: http://git-master/r/1379 Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Manjula Gupta <magupta@nvidia.com> Tested-by: Manjula Gupta <magupta@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
2010-05-10tegra ALSA: Do not queue buffers to the mixer in stopped stateSandeep Shinde
In SNDRV_PCM_TRIGGER_STOP state of the driver, if a buffer gets queued then it might not be returned back as it never gets rendered. In this scenario play_thread never exits as it keep on waiting for receiving all the buffers back from mixer before exiting. This is to solve bug 684393. In case of START->STOP->START scenario (happens in case of underruns), without closing the stream, there will not be any buffer loss as buffers are queued by application at appl_ptr and they remain there, once next START is called, they will be picked up for the playback. Change-Id: I4536e35bc59a6a4d67b24d9a8dc57a738ec695e3 Reviewed-on: http://git-master/r/1323 Reviewed-by: Gary King <gking@nvidia.com> Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Sandeep Shinde <sashinde@nvidia.com> Tested-by: Sandeep Shinde <sashinde@nvidia.com>
2010-05-07tegra ALSA: Replacing completion object with wait_queue_head_tSandeep Shinde
Following are the changes done: - Removed completion object appl_ptr_comp used for waiting for app buffers when buffer_in_quque=0. - If a completion object wakes-up after every 120 seconds if not signalled during that time. - Now using wait_queue_head_t which suits the purpose better. - Removed play_thread running dependency on shutdown_thrd as it is no more required. - Removed label EXIT from play_thread All these changes were done based on comments from Google. Refer to below issues for the complete discussion. http://codereview.chromium.org/1705013/show Change-Id: Id902a73f704ddf38ec8b9071bc36ee0f6db89f30 Reviewed-on: http://git-master/r/1305 Reviewed-by: Manjula Gupta <magupta@nvidia.com> Tested-by: Manjula Gupta <magupta@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
2010-05-03tegra ALSA : Handle Underrun CaseManjula Gupta
In case of underrun application triggers stop and starts the playback again, don't exit the thread in case of stop. underrun can happen when an application does not feed new samples in time to alsa-lib (due to CPU usage). With this change breaks may be observed in case of underrun which cannot be avoided, but the application will finish the playback and exits gracefully. For bug:663146 [LDK/Chromium/ALSA/Stability] "underrun!!!" (pcm_write:1442: write error: Input/output error) issues in ALSA while playback. Change-Id: Ib9b30461b4e381a66c3fd48467406e448aa41a17 Reviewed-on: http://git-master/r/1257 Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
2010-04-27tegra ALSA: Fixing kernel build breakSandeep Shinde
Kernel build is broken with the last changes that were commited with below commit Id. Commit Id: 1a6769405dbaa37775.... Change-Id: I7249e9e149545fa230ea1e61edf96175748073f3 Reviewed-on: http://git-master/r/1232 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Reviewed-by: Sandeep Shinde <sashinde@nvidia.com> Tested-by: Sandeep Shinde <sashinde@nvidia.com>
2010-04-27tegra ALSA: Fixing a hang in streaming playbackSandeep Shinde
In playback, play_thread hangs in case there is no continuous flow of buffers. That is when buffer_queue variable becomes 0 inside play_thread, it might hang on waiting for a semaphore. This conditions always happens in case of streaming playback, where buffer supply may not be continuous at the start. Resolved this hang by making use of ack function available for ALSA driver, this function is called from ALSA middleware whenever application buffer is supplied. Incorporated few more review comments. Fix for bug 674653 Synopsis: kernel spam when playing flash videos Change-Id: I4eeebdc3369b02b849955bd8dab1f8172a85c407 Reviewed-on: http://git-master/r/1211 Reviewed-by: Manjula Gupta <magupta@nvidia.com> Tested-by: Manjula Gupta <magupta@nvidia.com> Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2010-04-20[tegra ALSA] Updating sndfx header fileVijay Mali
In order to keep sndfx file in sync with audiofx header file updating tegra_sndfx.h with structures and definitions, made the corresponding changes in code. Verified both playback and record are working fine. For bug 676616 synopsis: ALSA is Broken Change-Id: Ic3eca9e88c861169bcbcc829a621adc40ea2bea7 Reviewed-on: http://git-master/r/1158 Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Manjula Gupta <magupta@nvidia.com> Tested-by: Manjula Gupta <magupta@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
2010-04-13[tegra ALSA] Updating sndfx header fileManjula Gupta
In order to keep sndfx file in sync with audiofx header file updating tegra_sndfx.h with structures and definitions, made the corresponding changes in code. Verified both playback and record are working fine. Change-Id: Ibfa400fcf1b62c55f169d427ae40aa9467d13f82 Reviewed-on: http://git-master/r/1079 Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
2010-03-31[ALSA]: Fix Record HangManjula Gupta
- Don't signal the shutdown thread until the thread process the SNDRV_PCM_TRIGGER_STOP call. The Kthread_stop() call is a blocking call that waits until the kthread_should_stop() returns. - Set the prtd->state to SNDRV_PCM_TRIGGER_STOP in pcm_common_close specifically to ensure proper clean-up and to handle the case where application exits without triggering the STOP call. - wait for the buffer done notification for the buffers queued in before setting mixer state to stop. - For Bug 667787 [LDK/Whistler/ALSA]"arecord" app hung with DVD quality .raw audio recording (Mono/Stereo). Change-Id: Id9c13bbd2dd0b5f90b3c545677eddfa05849c45f Reviewed-on: http://git-master/r/997 Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
2010-03-22[ALSA]: Add mmap support in kernel driver.Manjula Gupta
Add mmap callback in alsa to support mmap mode. For Bug:66326 [LDK/Whistler/ALSA] Add the mmap support in ALSA. Change-Id: Iecc128374ff365ef4fb92034d6256c6378bd1f20 Reviewed-on: http://git-master/r/909 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Manjula Gupta <magupta@nvidia.com>
2010-03-02[ALSA] Fixed buffer overrun & random crashesRavindra Lokhande
Replace NvOsSemaphore functions with linux semaphore. Fixed repeated playback of last few samples. Fixes bugs 652423, 652406 Change-Id: I679e67585a00884eb6169a39cb14dd5389e28ab8 Reviewed-on: http://git-master/r/706 Reviewed-by: Vijay Mali <vmali@nvidia.com> Tested-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
2010-02-25[tegra ALSA] replace enums by #defines in sndfx headerVijay Mali
In order to keep this file in sync with audiofx header file replcaing all enums by #defines, for better grouping of properties. As ALSA transoprt is tightly coupled to audiofx transport, adding a member in middle of existing enum was causing regressions in ALSA. #defines will allow adding new properties without breaking existing functionality. Change-Id: Iab57b14af3bcc318f6d83436ffecbc16808bb2ce
2010-02-18Merge "[ALSA]Adding PowerState and EndOfStream properties" into ↵Gary King
android-tegra-2.6.29
2010-02-17[ALSA]Adding PowerState and EndOfStream propertiesVijay Mali
In order to keep this file in sync with audiofx header file adding in properties namely PowerState and EndOfStream.
2010-02-15[ALSA]: Fix sample rate conversion for recordingManjula Gupta
- Add SRC and convert pin in Standard Input Path. - Modify the TEGRA_DEFAULT_BUFFER_SIZE to 8KB, it fixes the breaks in 8bit Mono playback. - Add S16_BE in supported format to support .au format. Sample data and other fields are stored in Big endian form in a-law(au) format. - Fix review comments on Patch Set 1. For Bug [LDK/Whistler/ALSA] Attempt to a-law(au) audio record results application/device hang(9/10). Change-Id: I8be2b8c85506ae60f10d5a0318e34a888be9e71c
2010-02-11Supporting all sample rates and formats in ALSAVijay Mali
Added support for all sample rates and bitrates, channels in ALSA SoC driver. Removed unevenly configured i2s, pcm and codec dai structures. with this change all three dais are evenly configured and support all pcm formats for playback and recording For bug 651142 Cant play 8bit (44.1Khz/48Khz)WAV streams (cherry picked from commit b0e4084126804700b34deedf6b9c496c121dc868)
2010-02-11Removing audio codec dependency from ALSA SoC driverVijay Mali
Added stub audio codec in alsa soc driver Removing platform dependent source files. ALSA driver is not doing audio codec initilization. It happens in audiofx. Got rid of unwanted I2C prints which were coming from wm8753 reg_write function. For bug 650664 Getting error while booting NvRmI2Ctransaction Failed:No I2C
2010-02-05[ALSA] Tegra SoC supportVijay Mali
Add audio SoC support for the NVIDIA Tegra SoC and the Harmony and Whistler development platforms. - single-link rpc dai driver to audio processor - basic machine driver for harmony and whistler platforms supports basic playback and record. Change-Id: Ifad3b503f1bfa0000440c9473f0a932f406a7731
2009-12-07Merge commit 'arm/2.6.28-arm' into android-tegra-2.6.29Gary King
Conflicts: MAINTAINERS arch/arm/Kconfig arch/arm/Makefile arch/arm/boot/compressed/head.S arch/arm/common/Makefile arch/arm/configs/realview-smp_defconfig arch/arm/configs/realview_defconfig arch/arm/configs/versatile_defconfig arch/arm/include/asm/elf.h arch/arm/include/asm/uaccess.h arch/arm/kernel/module.c arch/arm/kernel/signal.c arch/arm/mach-realview/Kconfig arch/arm/mach-realview/Makefile arch/arm/mach-realview/core.c arch/arm/mach-realview/core.h arch/arm/mach-realview/include/mach/board-pba8.h arch/arm/mach-realview/include/mach/debug-macro.S arch/arm/mach-realview/include/mach/hardware.h arch/arm/mach-realview/include/mach/irqs.h arch/arm/mach-realview/include/mach/memory.h arch/arm/mach-realview/include/mach/uncompress.h arch/arm/mach-realview/localtimer.c arch/arm/mach-realview/platsmp.c arch/arm/mach-realview/realview_eb.c arch/arm/mach-realview/realview_pb1176.c arch/arm/mach-realview/realview_pb11mp.c arch/arm/mach-realview/realview_pba8.c arch/arm/mm/Kconfig arch/arm/mm/copypage-v6.c arch/arm/mm/dma-mapping.c arch/arm/mm/proc-v7.S arch/arm/oprofile/op_model_mpcore.c arch/arm/tools/mach-types arch/arm/vfp/vfpmodule.c drivers/mtd/maps/integrator-flash.c drivers/net/smsc911x.c drivers/net/smsc911x.h
2009-10-26aaci: ARM1176 aaci-pl041 AC97 register read timeoutPhilby John
Subject: [PATCH] aaci: ARM1176 aaci-pl041 AC97 register read timeout After a reboot on an ARM1176 which amounts to a softreset, it has been noted that the ALSA driver does not get registered and the probe fails with the error "aaci-pl041 fpga:04: ac97 read back fail". In the process of reading from a register the SL1TxBusy bit is set indicating that the transceiver is busy and remains so until the default timeout occurs. Set the Power down register 0x26 to an arbitrary value as specified in the PL041 manual (page: 3-18) so that AACISL1TX/AACISL2TX registers take their default state. Signed-off-by: Philby John <pjohn@in.mvista.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-03-18Merge branch 'fix/opl3sa2-suspend' into for-linusTakashi Iwai
2009-03-18Merge branch 'fix/hda' into for-linusTakashi Iwai
2009-03-18ALSA: Fix vunmap and free order in snd_free_sgbuf_pages()Takashi Iwai
In snd_free_sgbuf_pags(), vunmap() is called after releasing the SG pages, and it causes errors on Xen as Xen manages the pages differently. Although no significant errors have been reported on the actual hardware, this order should be fixed other way round, first vunmap() then free pages. Cc: Jan Beulich <jbeulich@novell.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18ALSA: mixart, fix lock imbalanceJiri Slaby
There is an omitted unlock in one snd_mixart_hw_params fail path. Fix it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18ALSA: pcm_oss, fix locking typoJiri Slaby
s/mutex_lock/mutex_unlock/ on 2 fail paths in snd_pcm_oss_proc_write. Probably a typo, lock should be unlocked when leaving the function. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18ALSA: oss-mixer - Fixes recording gain controlViral Mehta
At the time of initialization, SNDRV_MIXER_OSS_PRESENT_PVOLUME bit is not set for MIC (slot 7). So, the same should not be checked when an application tries to do gain control for audio recording devices. Just check slot->present for SNDRV_MIXER_OSS_PRESENT_CVOLUME independently. Verified with a simple application which opens /dev/dsp for recording and /dev/mixer for volume control. Have tested two usb audio mic devices. Signed-off-by: Viral Mehta <viral.mehta@einfochips.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18ALSA: hda - Workaround for buggy DMA position on ATI controllersTakashi Iwai
The position-buffer on ATI controllers are unreliable as well as on VIA chips, thus the same workaround for DMA position reading as VIA is useful for ATI. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18ALSA: hda - Fix DMA mask for ATI controllersTakashi Iwai
ATI controllers (at least some SB0600 models) appear buggy to handle 64bit DMA. As a workaround, reset GCAP bit0 and let the driver to use only 32bit DMA on these controllers. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-17ALSA: opl3sa2 - Fix NULL dereference when suspending snd_opl3sa2Krzysztof Helt
Fix the OOPS during a opl3sa2 card suspend and resume if the driver is loaded but the card is not found. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-08Merge branch 'fix/hda' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix headphone-detect regression with multiple HP jacks ALSA: hda - Fix typos in slave controls in patch_sigmatel.c
2009-03-06ALSA: hda - Fix headphone-detect regression with multiple HP jacksTakashi Iwai
The recent changes over the DAC detection mechanism in patch_sigmatel.c breaks the HP detection on the machines with multiple HP jacks. It's basically because of the workaround to support the multi-channel output. Since the HP detection is more important feature, disable the HP-swap workaroud temporarily. Reference: Novell bnc#482052 https://bugzilla.novell.com/show_bug.cgi?id=482052 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-06ALSA: hda - Fix typos in slave controls in patch_sigmatel.cTakashi Iwai
"Headphone Playback ..." appears twice in slave_vols[] and slave_sws[]. They should be "Headphone Playback2 ..." Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-02Merge branch 'fix/hda' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Add probe_mask default for Toshiba laptop with ALC268 ALSA: hda - Add quirk for new HP xw series ALSA: hda - Fix digital mic on dell-m4-1 and dell-m4-3
2009-03-02ALSA: hda - Add probe_mask default for Toshiba laptop with ALC268Takashi Iwai
Some Toshiba laptops have another ALC268 codec on slot#3 that conflicts with the primary codec. The codec#3 is for the digital I/O, and should be fixed by the driver, but it'd need a bunch of changes. So, let's fix the probe problem temporarily by setting the default probe_mask value. Reference: kernel bugzilla #12735 http://bugzilla.kernel.org/show_bug.cgi?id=12735 Tested-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-27ALSA: hda - Add quirk for new HP xw seriesTakashi Iwai
Added model=hp-bpc for new HP xw series (103c:170b). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-27ALSA: hda - Fix digital mic on dell-m4-1 and dell-m4-3Takashi Iwai
Fix num_dmuxes initialization for dell-m4-1 and dell-m4-3 models of IDT 92HD71bxx codec, which was wrongly set to zero. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-25Merge branch 'fix/misc' into for-linusTakashi Iwai
2009-02-25Merge branch 'fix/hda' into for-linusTakashi Iwai
2009-02-24ALSA: emu10k1 - Fix digital/analog switch on audigy2 ZSTakashi Iwai
Fix the inverted logic of shared spdif switch. Reference: Novell bnc#478496 https://bugzilla.novell.com/show_bug.cgi?id=478496 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23ALSA: hda - Quirk for Acer Aspire 6530GJuan Jesus Garcia de Soria
The Acer Aspire 6530G needs the 4930G "model" for the front mic to work properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23ALSA: hda - add another MacBook Pro 3,1 SSIDLuke Yelavich
Reference: Ubuntu bug #33245 https://bugs.launchpad.net/bugs/332456 Signed-off-by: Luke Yelavich <themuso@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23ALSA: fix excessive background noise introduced by OSS emulation rate shrinkSteve Chen
Incorrect variable was used to get the next sample which caused S2 to be stuck with the same value resulting in loud background noise. Signed-off-by: Steve Chen <schen at mvista.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23ALSA: aw2: do not grab every saa7146 based deviceAnssi Hannula
Audiowerk2 driver snd-aw2 is bound to any saa7146 device as it does not check subsystem ids. Many DVB devices are saa7146 based, so aw2 driver grabs them as well. According to http://lkml.org/lkml/2008/10/15/311 aw2 devices have the subsystem ids set to 0, the saa7146 default. Fix conflicts with DVB devices by checking for subsystem ids = 0 specifically. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-22m68k: atari - Rename "mfp" to "st_mfp"Geert Uytterhoeven
http://kisskb.ellerman.id.au/kisskb/buildresult/72115/: | net/mac80211/ieee80211_i.h:327: error: syntax error before 'volatile' | net/mac80211/ieee80211_i.h:350: error: syntax error before '}' token | net/mac80211/ieee80211_i.h:455: error: field 'sta' has incomplete type | distcc[19430] ERROR: compile net/mac80211/main.c on sprygo/32 failed This is caused by | # define mfp ((*(volatile struct MFP*)MFP_BAS)) in arch/m68k/include/asm/atarihw.h, which conflicts with the new "mfp" enum in net/mac80211/ieee80211_i.h. Rename "mfp" to "st_mfp", as it's a way too generic name for a global #define. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-20ALSA: hda - Fix parse of init_verbs sysfs entryTakashi Iwai
Fixed the parse of init_verbs hwdep sysfs entry. Simplieied using sscanf. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20ALSA: pcxhr.h replace signed one-bit bitfieldsHarvey Harrison
The usage and comments make it clear values of 1/0 were intended rather than -1/0 Noticed by sparse: sound/pci/pcxhr/pcxhr.h:100:20: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:101:22: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:102:24: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:103:21: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:104:25: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:105:20: error: dubious one-bit signed bitfield Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-19Merge branch 'fix/usb-audio' into for-linusTakashi Iwai
2009-02-19Merge branch 'fix/misc' into for-linusTakashi Iwai
2009-02-19Merge branch 'fix/hda' into for-linusTakashi Iwai
2009-02-19sound: virtuoso: revert "do not overwrite EEPROM on Xonar D2/D2X"Clemens Ladisch
This reverts commit 7e86c0e6850504ec9516b953f316a47277825e33 ("do not overwrite EEPROM on Xonar D2/D2X") because it did not actually help with the problem. More user reports show that the overwriting of the EEPROM is not triggered by using this driver but by installing Linux, and that the installation of any other operating system (even one without any CMI8788 driver) has the same effect. In other words, the presence of this driver does not have any effect on the occurrence of the error. (So far, the available evidence seems to point to a BIOS bug.) Furthermore, it turns out that the EEPROM chip is protected against stray write commands by the command format and by requiring a separate write-enable command, so the error scenario in the previous commit (that SPI writes can be misinterpreted as an EEPROM write command) is not even theoretically possible. The mixer control that was removed as a consequence of the previous commit can only be partially emulated in userspace, which also means it cannot be seen be the in-kernel OSS API emulation, so it is better to revert that change. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>