Krzysztof Helt [Thu, 5 Nov 2009 17:32:41 +0000 (18:32 +0100)]
ALSA: cs4236: detect chip in one pass
The cs4236 was two step detection with call to the snd_wss_free()
between two steps. The snd_wss_free() did not free a sound device
created in the snd_wss_create(). This caused an OOPS during module
removal as the same sound device was released twice. The same OOPS
happened if the cs4236 module loading failed.
Fix this by adapting the snd_cs4236_create() to correctly work with
chips less capable then cs4236. The snd_cs4236_create() behaves the
same as the snd_wss_create() if the chip is less capable than the cs4236.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Tue, 3 Nov 2009 14:47:25 +0000 (15:47 +0100)]
ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"
To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.
Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.
Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel T Chen [Thu, 5 Nov 2009 02:03:46 +0000 (21:03 -0500)]
ALSA: intel8x0: Mute External Amplifier by default for another Sony model
BugLink: https://bugs.launchpad.net/bugs/474972
This Sony model needs External Amplifier muted for audible playback, so
make sure we set the inv_eapd quirk.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is a port of the sound/oss/sh_dac_audio.c driver.
The driver uses an on-chip 8-bit D/A converter, which has a speaker connected
to one of its channels, found in several ancient HP machines.
For interrupts it uses a high-resolution timer (hrtimer).
Tested on SH7709 based hp6xx (HP Jornada 680/690 and HP Palmtop 620lx/660lx).
Also, since OSS Emulation works, the old OSS sound/oss/sh_dac_audio.c driver
would be obsolete soon, and it could be removed.
Signed-off-by: Rafael Ignacio Zurita <rizurita@yahoo.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vitaliy Kulikov [Wed, 4 Nov 2009 06:57:45 +0000 (07:57 +0100)]
ALSA: hda - Enable GPIO control for mute LED on HP systems
This patch enables GPIO to control mute LED indicator on the HP systems
with the special string in BIOS and applies it with the correct polarity on
HP B-series systems.
It also restores configuration of the pin intended as the second Headphone
on HP B-series systems but configured as something else in the BIOS to
pass MS DTM.
ALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.
Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.
Daniel T Chen [Sun, 1 Nov 2009 23:32:29 +0000 (18:32 -0500)]
ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
BugLink: https://bugs.launchpad.net/bugs/368629
We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stas Sergeev [Sun, 1 Nov 2009 10:13:19 +0000 (11:13 +0100)]
ALSA: snd-pcsp: add nopcm mode
Currently, if the high-res timers are unavailable, snd-pcsp does not
initialize. People who choose it over pcspkr, loose their console beeps
in that case and get annoyed.
With this patch, the console beeps remain regardless of the high-res
timers. Additionally, the "nopcm" modparam is added to forcibly
disable the PCM capabilities of the driver.
Eero Nurkkala [Fri, 30 Oct 2009 11:34:02 +0000 (13:34 +0200)]
ASoC: remove io_mutex
Remove the io_mutex. It has a drawback of serializing
all accesses to snd_soc_update_bits() even when multiple
codecs are in use. In addition, it fails to actually do
its task - during snd_soc_update_bits(), dapm_update_bits()
may also be accessing the same register which may result in
an outdated register value.
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Takashi Iwai [Fri, 30 Oct 2009 12:21:49 +0000 (13:21 +0100)]
ALSA: hda - Switch to polling mode before disabling MSI
When any codec communication error happens, try to switch to the polling
mode first before turning off MSI. MSI gets more stable nowadays, thus
we should keep it on as much as possible.
Krzysztof Helt [Sat, 24 Oct 2009 15:47:33 +0000 (17:47 +0200)]
sound: remove OSS Ensoniq SoundScape driver
The OSS driver for Ensoniq SoundScape cards is broken after conversion
to mutexes and a new ALSA snd-sscape driver handles all devices handled
by the OSS one.
The ALSA driver was tested with these cards:
Spea V7 MediaFX
Ensoniq Soundscape Elite
Ensoniq Soundscape VIVO (this card is not handled by the OSS driver)
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Thu, 22 Oct 2009 07:04:09 +0000 (09:04 +0200)]
sound: via82xx: deactivate DXS controls of inactive streams
Activate the DXS volume controls only when the corresponding stream is
being used. This makes the behaviour consistent with the other drivers
that have per-stream volume controls.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 30 Oct 2009 11:31:39 +0000 (12:31 +0100)]
ALSA: hda - Add a proper ifdef to a debug code
Added a proper ifdef CONFIG_SND_DEBUG_VERBOSE to avoid a compile warning:
sound/pci/hda/patch_intelhdmi.c:406: warning: ‘hdmi_get_channel_count’ defined but not used
Roel Kluin [Fri, 23 Oct 2009 14:03:08 +0000 (16:03 +0200)]
ALSA: Cleanup redundant tests on unsigned
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.
In dac_audio_write() there does not occur a test for wrapped
values, but the test appears redundant.
Julia Lawall [Sat, 17 Oct 2009 06:33:47 +0000 (08:33 +0200)]
ALSA: sound/parisc: Move dereference after NULL test
If the NULL test on h is needed in snd_harmony_mixer_init, then the
dereference should be after the NULL test.
Actually, there is a sequence of calls: snd_harmony_create, then
snd_harmony_pcm_init, and then snd_harmony_mixer_init. snd_harmony_create
initializes h, but may indeed leave it as NULL. There was no NULL test at
the beginning of snd_harmony_pcm_init, so I have added one. The NULL test
in snd_harmony_mixer_init is then not necessary, but in case the ordering
of the calls changes, I have left it, and moved the dereference after it.
A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):
Julia Lawall [Sat, 17 Oct 2009 06:33:22 +0000 (08:33 +0200)]
ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.
In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.
A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):
Stas Sergeev [Fri, 30 Oct 2009 10:51:24 +0000 (11:51 +0100)]
ALSA: pcsp - Fix nforce workaround
The attached patch fixes the problems introduced in this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea0579fc85e64e9f05361d5aacf496fe7a151aa
- Fix nForce workaround by honouring the pointer_update var
- Revert "ns" to u64, as per the hrtimer API
- Revert to the zero-delay timer startup, since I can't reproduce any
problem with it (please, give me the hint!)
Wu Fengguang [Fri, 30 Oct 2009 10:40:03 +0000 (11:40 +0100)]
ALSA: hda - allow up to 4 HDMI devices
The new Intel HDMI codec supports 2 independant HDMI/DisplayPort pipes.
We'll be exporting them as 2 pcm devices. So bump up the allowed number
of HDMI devices.
SuperH FSI device have the hardware limitation to use DMA.
If DMA is used, LCD output will be broken.
Maybe there are some solution. But I don't know how to do it now.
This patch remove DMA support and use soft transfer.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Wu Zhangjin [Thu, 15 Oct 2009 02:22:54 +0000 (10:22 +0800)]
ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.
ASoC: OMAP3EVM: Use the twl4030_setup_data for headset pop-removal
The pop-removal specific values are configured for TWL4030 codec
for OMAP3EVM through this patch.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 29 Oct 2009 09:58:10 +0000 (11:58 +0200)]
ASoC: TWL4030: Change APLL powering sequence
It seams that certain part of the twl4030 codec needs the APLL
enabled before they are enabled.
Paths which has any digital processing needs need the APLL
enabled before they can function.
For example the vibra output will have some random data after
it is enabled and before the APLL also enabled.
If only analog components are in use (analog bypass), than it
seams, that the APLL does not need to be enabled. This lowers
the power consumption with around ~0.005A.
Adding DAPM_SUPPLY to the Digital playback route and also
to the capture route to enable and disable the APLL.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jari Vanhala [Thu, 29 Oct 2009 09:58:09 +0000 (11:58 +0200)]
ASoC: TWL4030: Vibra motor stop fix when it is driven with audio
This patch fixes vibrator playing incoherently, when driven
with audio. There is something wrong in switch 3 at
H-bridge and VIBRA_SET still affects PWM generator.
Slowest value fixes things.
Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Thu, 29 Oct 2009 01:24:32 +0000 (02:24 +0100)]
ASoC: CS4270: export de-emphasis filter as ALSA control
The CS4270 codec features an de-emphasis filter for compensation of
audio material filtered by an 50/15 uS algorithm. Not sure whether we
should always enable it for 44100Hz sampling frequency, but it should at
least be configurable by the user.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 28 Oct 2009 15:47:48 +0000 (15:47 +0000)]
ASoC: Minor SMDK64xx WM8580 cleanups
Fix up some comments, remove all enable_pin() calls (edge widgets
are all enabled by default) and mark the microphone as disabled by
default since it requires a resistor fit to connect it.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Wed, 28 Oct 2009 08:57:04 +0000 (10:57 +0200)]
ASoC: TWL4030: Remove bypass tracking
Since ASoC core now handling the codec bias differently
there is no need to do the tracking of bypass switch states
anymore.
Handling of the common bit for analog loopbacks is done with
DAPM_SUPPLY for the bypass paths.
Now this bit is only enabled when there is a complete analog
bypass path, compared to the previous implementation, when the
global switch was enabled if there were any of the analog
bypass switch was on (regardless if there were complete path or
not)
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Oct 2009 10:26:47 +0000 (13:26 +0300)]
ASoC: TWL4030: use the twl4030-codec.h for register descriptions
Remove the register descriptions from the twl4030.h file and use
the linux/mfd/twl4030-codec.h instead, which has the codec
related register descriptions also.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Oct 2009 10:26:46 +0000 (13:26 +0300)]
OMAP: Platform support for twl4030_codec MFD
Add needed platform data for the twl4030_codec MFD on boards,
where the audio part of the twl4030 codec is used.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Oct 2009 10:26:45 +0000 (13:26 +0300)]
MFD: twl4030: add twl4030_codec MFD as a new child to the core
New MFD child to twl4030 MFD device.
Reason for the twl4030_codec MFD: the vibra control is actually in the codec
part of the twl4030. If both the vibra and the audio functionality is needed
from the twl4030 at the same time, than they need to control the codec power
and APLL at the same time without breaking the other driver.
Also these two has to be able to work without the need for the other driver.
This MFD device will be used by the drivers, which needs resources
from the twl4030 codec like audio and vibra.
The platform specific configuration data is passed along to the
child drivers (audio, vibra).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Current implementation of those two functions found in
arch/arm/plat-ompa/dma.c doesn't support OMAP_DMA_DATA_BURST_16 on OMAP1 at
all, so they both end with BUG() on that machine. That results in
ASoC being completely unusable, at least on my OMAP5910 based Amstrad Delta.
The patch corrects the problem by not calling those two functions when run on
OMAP1 class based machines.
Created against linux-2.6.32-rc5.
Tested on Amstrad Delta.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Barry Song [Fri, 16 Oct 2009 10:13:38 +0000 (18:13 +0800)]
ASoC: Fix possible codec_dai->ops NULL pointer problems
Some codec DAIs like stac9766, wm9712, wm9713, ad1980 don't register themselves
then it loses to the chance to be given a null_dai_ops in snd_soc_register_dai
if they have no ops. When functions like soc_pcm_open, soc_pcm_hw_params etc.
access the ops field in these DAIs, panic will happen.
Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>