Takashi Iwai [Thu, 11 Dec 2008 11:12:06 +0000 (12:12 +0100)]
ALSA: sb8 - Fix a return code in the error path
Fixed a compile warning below:
sound/isa/sb/sb8.c: In function ‘snd_sb8_probe’:
sound/isa/sb/sb8.c:104: warning: ‘err’ may be used uninitialized in this function
by setting the return value correctly.
Peter Gruber [Wed, 3 Dec 2008 14:32:15 +0000 (15:32 +0100)]
ALSA: Reduce stall detection timeout in riptide.c
Reduce the command timeout to 0.5sec. Should be enough to allow a
working command interface but removes a RCU stall and slow resume on
some revisions where the AC97 revision detection stalls in resume.
Signed-off-by: Peter Gruber <nokos@gmx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
The function snd_mixart_create creates a link between mgr and card that
allows snd_mixart_free to free card as well. But if snd_mixart_create
fails, then the link has not been created and card has to be freed explicitly.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S,S1;
position p1,p2,p3;
expression E,E1;
type T,T1;
expression *ptr != NULL;
@@
(
if ((x@p1 = snd_card_new(...)) == NULL) S
|
x@p1 = snd_card_new(...);
)
... when != snd_card_free(...,(T)x,...)
when != if (...) { <+... snd_card_free(...,(T)x,...) ...+> }
when != true x == NULL || ...
when != x = E
when != E = (T)x
when any
(
if (x == NULL || ...) S1
|
if@p2 (...) {
... when != snd_card_free(...,(T1)x,...)
when != if (...) { <+... snd_card_free(...,(T1)x,...) ...+> }
when != x = E1
when != E1 = (T1)x
(
return \(0\|<+...x...+>\|ptr\);
|
return@p3 ...;
)
}
)
Takashi Iwai [Fri, 7 Nov 2008 08:08:15 +0000 (09:08 +0100)]
ALSA: Evaluate condition in snd_BUG_ON() in non-debugging case
Change snd_BUG_ON() to evaluate the given condition, at least, in syntax
for avoiding compile warnings such as unused variables. The compiler
should optimize out the condition evaluation in the real code, though.
Andrew Morton [Thu, 6 Nov 2008 20:05:21 +0000 (12:05 -0800)]
alsa: fix snd_BUG_on() and friends
sound/pci/pcxhr/pcxhr_core.c: In function 'pcxhr_set_pipe_cmd_params':
sound/pci/pcxhr/pcxhr_core.c:700: warning: statement with no effect
sound/pci/pcxhr/pcxhr_core.c:706: warning: statement with no effect
sound/pci/pcxhr/pcxhr_core.c:710: warning: statement with no effect
Due to
try to fix this, and be more conventional about the empty stubs.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vedran Miletic [Thu, 23 Oct 2008 16:51:00 +0000 (18:51 +0200)]
ALSA: emu10k1: fix coding style for emu10k1_main.c
I fixed all of coding style errors and some warnings, now it is down to:
checkpatch.pl-0.24 --no-tree --file --strict --terse emu10k1_main.c
total: 0 errors, 62 warnings, 7 checks, 2075 lines checked
Mark Brown [Wed, 22 Oct 2008 12:27:49 +0000 (13:27 +0100)]
ALSA: Ensure PXA runtime data is initialised
The rest of the code relies on the runtime data being zero initialised
so we need to use kzalloc() to allocate it.
Reported-by: Oliver Ford <ipaqlinux@oliford.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit 18c7109289625106cdc810b20b628cd13b46d6dd had #endif leftoff from
compilation. This patch fixes it.
Also, I replaced a misplaced comment by a useful one, that explains why are
here #ifdef and #endif added in compilation.
Vedran Miletic [Tue, 21 Oct 2008 15:42:54 +0000 (17:42 +0200)]
ALSA: emu10k1: fix device names for Live!/Audigy1/2/4/E-mu
* added missing SBxxxx, CTxxxx, PCxxx and MAEMxxxx where they were missing,
and fixed some of them which were wrong (according to kx.inf, which is pretty
accurate compared to anything out there)
* fixed device names to make them more consistent across various cards
* fixed order of devices where appropriate
Takashi Iwai [Mon, 11 Aug 2008 08:18:39 +0000 (10:18 +0200)]
ALSA: pcsp - Fix locking messes in snd-pcsp
snd-pcsp driver takes chip->substream_lock together with PCM substream
lock. These are even mixed up with hrtimer's lock, resulting in messy
lock depencies. Right now, snd-pcsp driver resolves the deadlock by
using HRTIMER_CB_SOFTIRQ. However, this isn't nice for a really fast
path like bit-flipping.
This patch introduces a tasklet for PCM period handling so that the
hrtimer callback can be handled fast. This also reduce the use of
chip->substream_lock to avoid deadlocks. It's still used in pointer
callback, but even this could be removed with a proper barrier.
Another good solution is to introduce async trigger callback. But,
this will involve with a major rewrite of the PCM core code, so I
take first this easy fix.
Randy Dunlap [Wed, 15 Oct 2008 21:38:40 +0000 (14:38 -0700)]
ALSA: kernel docs: fix sound/core/ kernel-doc
Add kernel-doc function short descriptions to sound/core functions that
are missing this short description. Mostly this involves moving some of
the function description onto the @funcname line.
Also correct a few variable names and fix other kernel-doc notation.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Wed, 15 Oct 2008 16:07:47 +0000 (17:07 +0100)]
ALSA: Handle NULL jacks in snd_jack_report()
Facilitate drivers that wish to carry on if they can't create a jack
input device by handling attempts to report the state of a NULL jack,
removing the need to check for initialisation before use.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Marc Zyngier [Tue, 14 Oct 2008 08:57:05 +0000 (09:57 +0100)]
ALSA: Fix pxa2xx-ac97-lib.c compilation
The last ALSA merge broke pxa2xx-ac97-lib.c, as it brought back
references to cpu_is_pxa21x that Eric Miao removed in commit 0ffcbfd54ea81ca24c0749f55ca4fcf3e2bdc23e:
[ARM] pxa: make cpu_is_pxa2* macros more consistent
This patch gets rid of those references, and only keeps cpu_is_pxa25x().
Signed-off-by: Marc Zyngier <maz@misterjones.org> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Mon, 13 Oct 2008 18:16:14 +0000 (19:16 +0100)]
ALSA: ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
Make the visibility of the tristate conditional on having the OpenFirmware
helper code enabed so that users who can't use it don't see the visible
option. Kconfig ignores dependencies for select so other users are
unaffected.
Thanks to Takashi for the suggestion.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Mon, 13 Oct 2008 17:22:45 +0000 (13:22 -0400)]
ALSA: hda: fix nid variable warning
Fixed compiler warning with possible uninitialized variable 'nid'.
CC [M] /home/mranostay/git/alsa-driver/pci/hda/patch_sigmatel.o
/home/mranostay/git/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c: In function
‘stac92xx_parse_auto_config’:
/home/mranostay/git/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:2815: warning: ‘nid’ may be used
uninitialized in this function
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Arun KS [Mon, 13 Oct 2008 10:17:25 +0000 (15:47 +0530)]
ALSA: ASoC: Fix compile-time warning for tlv320aic23.c
Fixes this warning:
sound/soc/codecs/tlv320aic23.c: In function 'tlv320aic23_write':
sound/soc/codecs/tlv320aic23.c:104: warning: passing argument 2 of
'codec->hw_write' makes pointer from integer without a cast
Replaces i2c smbus write function with standard i2c write function
Jonas Bonn [Wed, 1 Oct 2008 19:47:19 +0000 (21:47 +0200)]
ALSA: ASoC: Drop device registration from GTA01 lm4857 driver
Device registration should be handled at the machine level and not
in the driver code itself. This patch removes the device registration
from the driver code in preparation for moving it to the machine
definition.
[Squashed down two parts to this patch for bisectability - there's also
a third part adding registration of the device to the out of tree GTA01
machine driver -- broonie]
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jonas Bonn [Wed, 1 Oct 2008 17:17:12 +0000 (18:17 +0100)]
ALSA: ASoC: Add widgets before setting endpoints on GTA01
This prevents error messages at startup where the endpoints are being
set before the widgets/controls have even been added.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jarkko Nikula [Thu, 9 Oct 2008 12:57:21 +0000 (15:57 +0300)]
ALSA: ASoC: OMAP: Set DMA stream name at runtime in McBSP DAI driver
This suits better when adding support for multiple links and different
link formats.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jarkko Nikula [Thu, 9 Oct 2008 12:57:20 +0000 (15:57 +0300)]
ALSA: ASoC: OMAP: Add support for OMAP2430 and OMAP34xx in McBSP DAI driver
Thanks to Arun KS <arunks@mistralsolutions.com> for fixing one typo in
original version of this patch.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jarkko Nikula [Thu, 9 Oct 2008 12:57:22 +0000 (15:57 +0300)]
ALSA: ASoC: OMAP: Add multilink support to McBSP DAI driver
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Fri, 10 Oct 2008 11:32:16 +0000 (12:32 +0100)]
ALSA: ASoC: Make TLV320AIC26 user-visible
The TLV320AIC26 Kconfig option is unusual in that it supports the
OpenFirmware machine driver which doesn't have a hard binding to the
codec driver but discovers the codec via the device tree. This makes it
meaningful to select the codec without a machine driver.
Ideally there would be a proxy entry so that this option was only
visible on OpenFirmware systems.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Tue, 7 Oct 2008 15:13:50 +0000 (16:13 +0100)]
ALSA: ASoC: Make WM8510 microphone input a DAPM mixer
The WM8510 microphone input PGA was represented as a DAPM PGA but in
DAPM terms the functionality is that of a mixer since it takes three
switchable inputs and produces one output. Representing it as an input
was causing its controls to be misinterpreted as gain controls and
would cause some required DAPM updates to be missed.
Reported-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Tue, 7 Oct 2008 12:04:58 +0000 (13:04 +0100)]
ALSA: ASoC: Implement WM8510 bias level control
The WM8510 bias level configuration blindly overwrites the power
management registers, interfering with the operation of DAPM.
Only adjust the specific bits required, implementing use of the VMID
resistor string configuration control as we go.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jarkko Nikula [Tue, 7 Oct 2008 11:49:22 +0000 (14:49 +0300)]
ALSA: ASoC: Remove unused AUDIO_NAME define from codec drivers
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jarkko Nikula [Tue, 7 Oct 2008 11:49:23 +0000 (14:49 +0300)]
ALSA: ASoC: tlv320aic3x: Use uniform tlv320aic naming
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Tue, 7 Oct 2008 10:56:20 +0000 (11:56 +0100)]
ALSA: ASoC: Add WM8510 SPI support
Implement SPI support for WM8510, cut'n'pasting from the support for
WM8731 contributed by Cliff Cai and Alan Horstmann since the wire format
is the same for both codecs.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Mon, 6 Oct 2008 15:54:34 +0000 (16:54 +0100)]
ALSA: ASoC: Add WM8753 SPI support
Implement SPI support for WM8753, cut'n'pasting from the support for
WM8731 contributed by Cliff Cai and Alan Horstmann since the wire format
is the same for both codecs.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Frank Mandarino [Tue, 30 Sep 2008 14:42:40 +0000 (10:42 -0400)]
ALSA: ASoC: Remove references to Endrelia ETI-B1 board
The ASoC machine drivers for this board were only provided as examples
for the new AT91 ASoC platform driver. Since the ETI-B1 board is
proprietary and there are other AT91 ASoC machine drivers available,
it makes sense to remove these drivers.
Signed-off-by: Frank Mandarino <fmandarino@endrelia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Wed, 24 Sep 2008 10:23:11 +0000 (11:23 +0100)]
ALSA: ASoC: Allow machine drivers to mark pins as not connected
Add a new API call snd_soc_dapm_nc_pin() which allows machine drivers to
mark pins as being permanently disabled. At present this is identical
to snd_soc_dapm_disable_pin() except in terms of improving the internal
documentation of machine drivers that use it. The intention is that in
future it will be extended to provide additional features such as hiding
controls that are only relevant to paths using the disconnected pin.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Wed, 8 Oct 2008 12:02:20 +0000 (13:02 +0100)]
ALSA: ASoC: Check for machine type in GTA01 machine driver
Since there are now multiple OpenMoko platforms it is more important to
check that the machine driver is running on the correct system. This
was orgininally generated as part of the initial GTA02 machine port.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ALSA: usb-audio: dynamic detection of MIDI interfaces in uaxx-quirk
The MIDI interfaces have to be detected dynamically for Edirol devices
ua-700, ua-25 and ua4-fx. This patch reverses the wrong changes made by
my other patch in uaxx-quirk.
Signed-off-by: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai [Tue, 7 Oct 2008 14:13:59 +0000 (16:13 +0200)]
ALSA: Add a note on dependency of RTC stuff
Added a note on the dependency of old RTC stuff, which is exclusive
with the new RTC class drivers.
http://bugme.linux-foundation.org/show_bug.cgi?id=11430
Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Richard Zhao [Tue, 7 Oct 2008 00:05:20 +0000 (08:05 +0800)]
ALSA: ASoC: add new param mux to dapm_mux_update_power
Function dapm_mux_update_power needs enum index mux and register mask value val
as parameters, but it only has a parameter val, and uses it as both val and mux.
snd_soc_test_bits(widget->codec, e->reg, mask, val) val is register mask here,
e->texts[val] but val should be enum index mux here.
This patch adds a new param mux to fix it.
Signed-off-by: Richard Zhao <linuxzsc@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai [Tue, 7 Oct 2008 09:38:09 +0000 (11:38 +0200)]
ALSA: Increase components array size
Increase the card components[] (and thus snd_card_info.components[],
too) array size from 80 to 128 chars so that more strings can be
stored. The 80 chars aren't enough for more than 2 HD-audio codecs,
and this hits an ugly snd_BUG() as reported by Wu Fegguang for HP
2230s.
The control protocol number is increased to 2.0.6 as well, in case
it matters.
Reported-by: Wu Fengguang <wfg@linux.intel.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>