]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Mon, 22 Nov 2010 12:13:48 +0000 (13:13 +0100)]
Merge branch 'fix/asoc' into for-next

13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Mon, 22 Nov 2010 10:02:10 +0000 (11:02 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoRevert "ALSA: HDA: Create mixers on ALC887"
Takashi Iwai [Mon, 22 Nov 2010 10:02:03 +0000 (11:02 +0100)]
Revert "ALSA: HDA: Create mixers on ALC887"

This reverts commit 03b7a1ab557efe34e8f79b78660e514bd7374248.

13 years agoALSA: hda - Fixed ALC887-VD initial error
Kailang Yang [Mon, 22 Nov 2010 09:59:36 +0000 (10:59 +0100)]
ALSA: hda - Fixed ALC887-VD initial error

ALC887-VD is like ALC888-VD. It can not be initialized as ALC882.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: atmel - Fix the return value in error path
Takashi Iwai [Mon, 22 Nov 2010 07:58:13 +0000 (08:58 +0100)]
ALSA: atmel - Fix the return value in error path

In the commit c0763e687d0283d0db507813ca4462aa4073c5b5
    ALSA: snd-atmel-abdac: test wrong variable
the return value via PTR_ERR() had to be fixed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
Daniel T Chen [Sun, 21 Nov 2010 19:01:14 +0000 (14:01 -0500)]
ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J

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>
13 years agoALSA: snd-atmel-abdac: test wrong variable
Vasiliy Kulikov [Sun, 21 Nov 2010 17:40:07 +0000 (20:40 +0300)]
ALSA: snd-atmel-abdac: test wrong variable

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>
13 years agoALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
Andreas Mohr [Sun, 21 Nov 2010 11:09:32 +0000 (12:09 +0100)]
ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer

. 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>
13 years agoALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
Daniel T Chen [Sat, 20 Nov 2010 15:20:35 +0000 (10:20 -0500)]
ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup

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>
13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Mon, 22 Nov 2010 07:59:31 +0000 (08:59 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: atmel - Fix the return value in error path
Takashi Iwai [Mon, 22 Nov 2010 07:58:13 +0000 (08:58 +0100)]
ALSA: atmel - Fix the return value in error path

In the commit 5ad57d20c91bdaf743bd8e3015df5a388314df8d
    ALSA: snd-atmel-abdac: test wrong variable
the return value via PTR_ERR() had to be fixed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Mon, 22 Nov 2010 07:16:08 +0000 (08:16 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: timer: automatically load the high-resolution timer
Clemens Ladisch [Thu, 18 Nov 2010 08:53:54 +0000 (09:53 +0100)]
ALSA: timer: automatically load the high-resolution timer

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>
13 years agoALSA: pcm: optimize xrun detection in no-period-wakeup mode
Clemens Ladisch [Thu, 18 Nov 2010 08:53:07 +0000 (09:53 +0100)]
ALSA: pcm: optimize xrun detection in no-period-wakeup mode

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>
13 years agoALSA: pcm: detect xruns in no-period-wakeup mode
Clemens Ladisch [Thu, 18 Nov 2010 08:43:52 +0000 (09:43 +0100)]
ALSA: pcm: detect xruns in no-period-wakeup mode

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>
13 years agoALSA: oxygen: support for period wakeup disabling
Clemens Ladisch [Mon, 15 Nov 2010 09:50:37 +0000 (10:50 +0100)]
ALSA: oxygen: support for period wakeup disabling

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>
13 years agoALSA: hda-intel: support for period wakeup disabling
Clemens Ladisch [Mon, 15 Nov 2010 09:49:47 +0000 (10:49 +0100)]
ALSA: hda-intel: support for period wakeup disabling

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>
13 years agoALSA: pcm: support for period wakeup disabling
Clemens Ladisch [Mon, 15 Nov 2010 09:46:23 +0000 (10:46 +0100)]
ALSA: pcm: support for period wakeup disabling

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>
13 years agoMerge branch 'fix/misc' into topic/misc
Takashi Iwai [Mon, 22 Nov 2010 07:11:10 +0000 (08:11 +0100)]
Merge branch 'fix/misc' into topic/misc

13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Mon, 22 Nov 2010 07:03:27 +0000 (08:03 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
Daniel T Chen [Sun, 21 Nov 2010 19:01:14 +0000 (14:01 -0500)]
ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J

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>
13 years agoALSA: snd-atmel-abdac: test wrong variable
Vasiliy Kulikov [Sun, 21 Nov 2010 17:40:07 +0000 (20:40 +0300)]
ALSA: snd-atmel-abdac: test wrong variable

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>
13 years agoALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
Andreas Mohr [Sun, 21 Nov 2010 11:09:32 +0000 (12:09 +0100)]
ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer

. 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>
13 years agoALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
Daniel T Chen [Sat, 20 Nov 2010 15:20:35 +0000 (10:20 -0500)]
ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup

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>
13 years agoALSA: HDA: Create mixers on ALC887
David Henningsson [Tue, 9 Nov 2010 13:35:30 +0000 (14:35 +0100)]
ALSA: HDA: Create mixers on ALC887

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>
13 years agoALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
Joe Perches [Mon, 15 Nov 2010 20:14:02 +0000 (12:14 -0800)]
ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons
Joe Perches [Mon, 15 Nov 2010 03:05:02 +0000 (19:05 -0800)]
ALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: sound/ppc: Use printf extension %pR for struct resource
Joe Perches [Fri, 12 Nov 2010 21:38:04 +0000 (13:38 -0800)]
ALSA: sound/ppc: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls
Daniel T Chen [Mon, 1 Nov 2010 05:14:51 +0000 (01:14 -0400)]
ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls

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>
13 years agoASoC: uda134x - set reg_cache_default to uda134x_reg
Axel Lin [Fri, 19 Nov 2010 07:48:06 +0000 (15:48 +0800)]
ASoC: uda134x - set reg_cache_default to uda134x_reg

After checking the code in 2.6.36,
I found this is missing during multi-component conversion.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add support for MAX98089 CODEC
Jesse Marroquin [Wed, 17 Nov 2010 20:26:40 +0000 (14:26 -0600)]
ASoC: Add support for MAX98089 CODEC

This patch adds initial support for the MAX98089 CODEC.

Signed-off-by: Jesse Marroquin <jesse.marroquin@maxim-ic.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: davinci: fixes for multi-component
Chris Paulson-Ellis [Tue, 16 Nov 2010 12:27:09 +0000 (12:27 +0000)]
ASoC: davinci: fixes for multi-component

Multi-component commit f0fba2ad broke a few things which this patch should
fix. Tested on the DM355 EVM. I've been as careful as I can, but it would be
good if those with access to other Davinci boards could test.

--

The multi-component commit put the initialisation of
snd_soc_dai.[capture|playback]_dma_data into snd_soc_dai_ops.hw_params of the
McBSP, McASP & VCIF drivers (davinci-i2s.c, davinci-mcasp.c & davinci-vcif.c).
The initialisation had to be moved from the probe function in these drivers
because davinci_*_dai changed from snd_soc_dai to snd_soc_dai_driver.

Unfortunately, the DMA params pointer is needed by davinci_pcm_open (in
davinci-pcm.c) before hw_params is called. I have moved the initialisation to
a new snd_soc_dai_ops.startup function in each of these drivers. This fix
indicates that all platforms that use davinci-pcm must have been broken and
need to test with this fix.

--

The multi-component commit also changed the McBSP driver name from
"davinci-asp" to "davinci-i2s" in davinci-i2s.c without updating the board
level references to the driver name. This change is understandable, as there
is a similarly named "davinci-mcasp" driver in davinci-mcasp.c.

There is probably no 'correct' name for this driver. The DM6446 datasheet
calls it the "ASP" and describes it as a "specialised McBSP". The DM355
datasheet calls it the "ASP" and describes it as a "specialised ASP". The
DM365 datasheet calls it the "McBSP". Rather than fix this problem by
reverting to "davinci-asp", I've elected to avoid future confusion with the
"davinci-mcasp" driver by changing it to "davinci-mcbsp", which is also
consistent with the names of the functions in the driver. There are other
fixes required, so it was never going to be as simple as a revert anyway.

--

The DM365 only has one McBSP port (of the McBSP platforms, only the DM355 has
2 ports), so I've changed the the id of the platform_device from 0 to -1.

--

In davinci-evm.c, the DM6446 EVM can no longer share a snd_soc_dai_link
structure with the DM355 EVM as they use different cpu DAI names (the DM355
has 2 ports and the EVM uses the second port, but the DM6446 only has 1 port).
This also means that the 2 boards need different snd_soc_card structures.

--

The codec_name entries in davinci-evm.c didn't match the i2c ids in the board
files. I have only checked and fixed the details of the names used for the
McBSP based platforms. Someone with a McASP based platform (eg DA8xx) should
check the others.

Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix register cache setup WM8994 for multi-component
Mark Brown [Tue, 16 Nov 2010 18:39:19 +0000 (18:39 +0000)]
ASoC: Fix register cache setup WM8994 for multi-component

During the multi-component conversion the WM8994 register cache init
got lost.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix dapm_seq_compare() for multi-component
Mark Brown [Fri, 12 Nov 2010 15:14:55 +0000 (15:14 +0000)]
ASoC: Fix dapm_seq_compare() for multi-component

Ensure that we keep all widget powerups in DAPM sequence by making
the CODEC the last thing we compare on rather than the first thing.
Also fix the fact that we're currently comparing the widget pointers
rather than the CODEC pointers when we do the substraction so we
won't get stable results.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: RX1950: Fix hw_params function
Vasily Khoruzhick [Sat, 13 Nov 2010 12:53:41 +0000 (14:53 +0200)]
ASoC: RX1950: Fix hw_params function

Unfortunatelly, I misunderstood datasheet, and on s3c244x-iis
when MPLLin source for master clock is selected, prescaler has
no effect. Remove dividor calculation for 44100 rate; remove 88200
rate at all, rx1950 can't do it.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoFix Atmel soc audio boards Kconfig dependency
Ryan Mallon [Wed, 10 Nov 2010 20:02:30 +0000 (09:02 +1300)]
Fix Atmel soc audio boards Kconfig dependency

Add Kconfig dependency on AT91_PROGRAMMABLE_CLOCKS for the Atmel SoC
audio SAM9G20-EK and PlayPaq boards. Fixes link errors on missing
clk_set_parent and clk_set_rate when building without
AT91_PROGRAMMABLE_CLOCKS.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Geoffrey Wossum <gwossum@acm.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Thu, 11 Nov 2010 01:03:52 +0000 (02:03 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: AT73C213: Rectify misleading comment.
Peter Rosin [Wed, 10 Nov 2010 14:55:05 +0000 (15:55 +0100)]
ALSA: AT73C213: Rectify misleading comment.

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>
13 years agoALSA: sound/pci/ctxfi/ctpcm.c: Remove potential for use after free
Julia Lawall [Tue, 9 Nov 2010 22:00:41 +0000 (23:00 +0100)]
ALSA: sound/pci/ctxfi/ctpcm.c: Remove potential for use after free

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>
13 years agoALSA: sound/mixart: avoid redefining {readl,write}_{le,be} accessors
Florian Fainelli [Tue, 9 Nov 2010 17:29:08 +0000 (18:29 +0100)]
ALSA: sound/mixart: avoid redefining {readl,write}_{le,be} accessors

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>
13 years agoALSA: HDA: Enable digital mic on IDT 92HD87B
David Henningsson [Wed, 13 Oct 2010 13:48:24 +0000 (15:48 +0200)]
ALSA: HDA: Enable digital mic on IDT 92HD87B

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>
13 years agosound/oss: Remove unnecessary casts of void ptr
Jesper Juhl [Mon, 8 Nov 2010 23:11:03 +0000 (00:11 +0100)]
sound/oss: Remove unnecessary casts of void ptr

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>
13 years agosound/oss/dev_table.c: Use vzalloc
Joe Perches [Fri, 5 Nov 2010 03:08:12 +0000 (20:08 -0700)]
sound/oss/dev_table.c: Use vzalloc

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: Ensure sane WM835x AIF configuration by default
Mark Brown [Tue, 9 Nov 2010 14:38:58 +0000 (14:38 +0000)]
ASoC: Ensure sane WM835x AIF configuration by default

Ensure that whatever ran before us leaves the WM835x with a sane default
audio interface configuration as we do not override the companding,
loopback or tristate settings and do not reset the chip at startup (as it
is a PMIC).

Reported-by: Keiji Mitsuhisa <Keiji.Mitsuhisa@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Remove broken WM8350 direction constants
Mark Brown [Tue, 9 Nov 2010 12:00:11 +0000 (12:00 +0000)]
ASoC: Remove broken WM8350 direction constants

The WM8350 driver was using some custom constants to interpret the direction
of the MCLK signal which had the opposite values to those used as standard
by the ASoC core, causing confusion in machine drivers such as the 1133-EV1
board.

Reported-by: Tommy Zhu <Tommy.Zhu@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: s3c24xx: Fix compilation problem for mini2440
Marek Belisko [Mon, 8 Nov 2010 12:14:51 +0000 (13:14 +0100)]
ASoC: s3c24xx: Fix compilation problem for mini2440

When make mini2440_defconfig compilation end with undefined
references to DMA functions. There was missing selection
for S3C2410_DMA when compile ASoC audio for S3C24xx CPU.
Tested on mini2440 board.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Return proper error if snd_soc_register_dais fails in psc_i2s_of_probe
Axel Lin [Mon, 8 Nov 2010 05:24:58 +0000 (13:24 +0800)]
ASoC: Return proper error if snd_soc_register_dais fails in psc_i2s_of_probe

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: WM8776: Removed unneeded struct member
Dimitris Papastamos [Fri, 5 Nov 2010 10:36:24 +0000 (10:36 +0000)]
ASoC: WM8776: Removed unneeded struct member

The member reg_cache is not used at all and therefore it should be
removed.  This member was usually needed for older versions of ASoC
that did not handle caching automatically and had to be done in the
driver itself.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Lock the CODEC in PXA external jack controls
Mark Brown [Fri, 5 Nov 2010 17:50:48 +0000 (13:50 -0400)]
ASoC: Lock the CODEC in PXA external jack controls

When doing anything with the system, especially DAPM, we need to hold the
CODEC mutex.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agophycore-ac97: add ac97 to cardname
Sascha Hauer [Thu, 4 Nov 2010 16:05:44 +0000 (17:05 +0100)]
phycore-ac97: add ac97 to cardname

We have different codecs on the pcm038 (ac97 wm9712 and mc13783).
To make alsactl restore work correctly these should have different
names.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC i.MX: switch to new DMA api
Sascha Hauer [Thu, 4 Nov 2010 16:05:43 +0000 (17:05 +0100)]
ASoC i.MX: switch to new DMA api

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC i.MX: register dma audio device
Sascha Hauer [Thu, 4 Nov 2010 16:05:42 +0000 (17:05 +0100)]
ASoC i.MX: register dma audio device

We have two different transfer methods on i.MX: FIQ and DMA. Since
the merge of the ASoC multicomponent support the DMA device is lost.
Add it again. Also, imx_ssi_dai_probe has to be called for !AC97
aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC i.MX phycore ac97: remove unnecessary includes
Sascha Hauer [Thu, 4 Nov 2010 16:05:41 +0000 (17:05 +0100)]
ASoC i.MX phycore ac97: remove unnecessary includes

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC i.MX eukrea tlv320: Fix for multicomponent
Sascha Hauer [Thu, 4 Nov 2010 16:05:40 +0000 (17:05 +0100)]
ASoC i.MX eukrea tlv320: Fix for multicomponent

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Check return value of strict_strtoul() in WM8962
Mark Brown [Wed, 3 Nov 2010 13:37:06 +0000 (09:37 -0400)]
ASoC: Check return value of strict_strtoul() in WM8962

strict_strtoul() has been made __must_check so do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoMerge remote branch 'takashi/fix/asoc' into for-2.6.37
Mark Brown [Wed, 3 Nov 2010 16:32:54 +0000 (12:32 -0400)]
Merge remote branch 'takashi/fix/asoc' into for-2.6.37

13 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Wed, 3 Nov 2010 14:55:44 +0000 (15:55 +0100)]
Merge branch 'for-linus' into for-next

13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Wed, 3 Nov 2010 14:51:26 +0000 (15:51 +0100)]
Merge branch 'fix/asoc' into for-linus

13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Wed, 3 Nov 2010 14:51:08 +0000 (15:51 +0100)]
Merge branch 'fix/asoc' into for-next

13 years agoASoC: tpa6130a2: Get rid of compile warning from tpa6130a2_power
Jarkko Nikula [Wed, 3 Nov 2010 14:39:00 +0000 (16:39 +0200)]
ASoC: tpa6130a2: Get rid of compile warning from tpa6130a2_power

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>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Wed, 3 Nov 2010 13:58:11 +0000 (14:58 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: oxygen: add HiFier Serenade support
Clemens Ladisch [Wed, 3 Nov 2010 11:26:35 +0000 (12:26 +0100)]
ALSA: oxygen: add HiFier Serenade support

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>
13 years agoALSA: oxygen: reorganize PCI IDs
Clemens Ladisch [Wed, 3 Nov 2010 10:36:33 +0000 (11:36 +0100)]
ALSA: oxygen: reorganize PCI IDs

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>
13 years agoASoC: Fix snd_soc_register_dais error handling
Axel Lin [Wed, 3 Nov 2010 07:04:45 +0000 (15:04 +0800)]
ASoC: Fix snd_soc_register_dais error handling

kzalloc for dai may fail at any iteration of the for loop,
thus properly unregister already registered DAIs before return error.

The error handling code in snd_soc_register_dais() already ensure all the DAIs
are unregistered before return error, we can remove the error handling code
to unregister DAIs in snd_soc_register_codec().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Wed, 3 Nov 2010 12:56:24 +0000 (13:56 +0100)]
Merge branch 'fix/asoc' into for-next

13 years agoMerge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Wed, 3 Nov 2010 12:56:08 +0000 (13:56 +0100)]
Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc

13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Wed, 3 Nov 2010 07:27:50 +0000 (08:27 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: oxygen: add Kuroutoshikou CMI8787-HG2PCI support
Clemens Ladisch [Tue, 2 Nov 2010 16:18:23 +0000 (17:18 +0100)]
ALSA: oxygen: add Kuroutoshikou CMI8787-HG2PCI support

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>
13 years agoALSA: oxygen: merge HiFier driver into snd-oxygen
Clemens Ladisch [Tue, 2 Nov 2010 16:08:37 +0000 (17:08 +0100)]
ALSA: oxygen: merge HiFier driver into snd-oxygen

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>
13 years agoMerge branch 'fix/misc' into topic/misc
Takashi Iwai [Wed, 3 Nov 2010 07:17:18 +0000 (08:17 +0100)]
Merge branch 'fix/misc' into topic/misc

13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Wed, 3 Nov 2010 07:16:16 +0000 (08:16 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: hda - MacBookAir3,1(3,2) alsa support
Edgar (gimli) Hucek [Wed, 3 Nov 2010 07:14:10 +0000 (08:14 +0100)]
ALSA: hda - MacBookAir3,1(3,2) alsa support

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>
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Tue, 2 Nov 2010 15:05:11 +0000 (16:05 +0100)]
Merge branch 'topic/asoc' into for-next

13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Tue, 2 Nov 2010 15:04:53 +0000 (16:04 +0100)]
Merge branch 'fix/asoc' into for-next

13 years agoMerge branch 'for-2.6.37' into HEAD
Mark Brown [Tue, 2 Nov 2010 13:58:49 +0000 (09:58 -0400)]
Merge branch 'for-2.6.37' into HEAD

WARN() fix from Joe moved.

Conflicts:
sound/soc/codecs/wm_hubs.c

13 years agoMerge commit 'v2.6.37-rc1' into for-2.6.37
Mark Brown [Tue, 2 Nov 2010 13:41:56 +0000 (09:41 -0400)]
Merge commit 'v2.6.37-rc1' into for-2.6.37

13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Tue, 2 Nov 2010 13:34:30 +0000 (14:34 +0100)]
Merge branch 'fix/asoc' into for-next

13 years agoASoC: fix the building issue of missing codec field in 'struct snd_soc_card'
Eric Miao [Mon, 1 Nov 2010 21:10:07 +0000 (05:10 +0800)]
ASoC: fix the building issue of missing codec field in 'struct snd_soc_card'

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Tue, 2 Nov 2010 11:41:16 +0000 (12:41 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: usb-audio - Support for Power/Status LED on Creative USB X-Fi S51
Mandar Joshi [Tue, 2 Nov 2010 14:43:19 +0000 (14:43 +0000)]
ALSA: usb-audio - Support for Power/Status LED on Creative USB X-Fi S51

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>
13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Tue, 2 Nov 2010 06:38:46 +0000 (07:38 +0100)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: asihpi - Unsafe memory management when allocating control cache
Jesper Juhl [Fri, 29 Oct 2010 19:35:25 +0000 (21:35 +0200)]
ALSA: asihpi - Unsafe memory management when allocating control cache

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>
13 years agoASoC: Update WARN uses in wm_hubs
Joe Perches [Sat, 30 Oct 2010 21:08:56 +0000 (14:08 -0700)]
ASoC: Update WARN uses in wm_hubs

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>
13 years agoASoC: Fix SND_SOC_ALL_CODECS typo for alc5623
Jarkko Nikula [Fri, 29 Oct 2010 13:47:44 +0000 (16:47 +0300)]
ASoC: Fix SND_SOC_ALL_CODECS typo for alc5623

Include alc5623.c in SND_SOC_ALL_CODECS when 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>
13 years agoMerge branch 'for-2.6.37' into for-2.6.38
Mark Brown [Mon, 1 Nov 2010 17:58:18 +0000 (13:58 -0400)]
Merge branch 'for-2.6.37' into for-2.6.38

13 years agoASoC: Include cx20442 to SND_SOC_ALL_CODECS
Jarkko Nikula [Fri, 29 Oct 2010 13:47:45 +0000 (16:47 +0300)]
ASoC: Include cx20442 to SND_SOC_ALL_CODECS

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>
13 years agoASoC: Fix SND_SOC_ALL_CODECS typo for jz4740
Jarkko Nikula [Fri, 29 Oct 2010 13:47:44 +0000 (16:47 +0300)]
ASoC: Fix SND_SOC_ALL_CODECS typo for jz4740

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>
13 years agoASoC: Remove volatility from WM8900 POWER1 register
Mark Brown [Fri, 29 Oct 2010 22:41:17 +0000 (15:41 -0700)]
ASoC: Remove volatility from WM8900 POWER1 register

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
13 years agoLinux 2.6.37-rc1 v2.6.37-rc1
Linus Torvalds [Mon, 1 Nov 2010 11:54:12 +0000 (07:54 -0400)]
Linux 2.6.37-rc1

13 years agoMerge branch 'for-linus' of git://www.jni.nu/cris
Linus Torvalds [Mon, 1 Nov 2010 11:53:19 +0000 (07:53 -0400)]
Merge branch 'for-linus' of git://www.jni.nu/cris

* '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.

13 years agoMerge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Mon, 1 Nov 2010 11:50:43 +0000 (07:50 -0400)]
Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6

* '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

13 years agoCRIS: Add paths for CRISv10 serial driver
Jesper Nilsson [Mon, 1 Nov 2010 10:01:14 +0000 (11:01 +0100)]
CRIS: Add paths for CRISv10 serial driver

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Mon, 1 Nov 2010 09:42:57 +0000 (10:42 +0100)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: lx6464es - make 1 bit signed bitfield unsigned
Tim Blechmann [Sun, 31 Oct 2010 18:46:19 +0000 (19:46 +0100)]
ALSA: lx6464es - make 1 bit signed bitfield unsigned

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>
13 years agoALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create()
Jesper Juhl [Fri, 29 Oct 2010 20:54:45 +0000 (22:54 +0200)]
ALSA: cs46xx memory management fixes for cs46xx_dsp_spos_create()

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>
13 years agoALSA: usb - driver neglects kmalloc return value check and may deref NULL
Jesper Juhl [Fri, 29 Oct 2010 18:40:23 +0000 (20:40 +0200)]
ALSA: usb - driver neglects kmalloc return value check and may deref NULL

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>
13 years agospi/pl022: fix erroneous platform data in U300
Linus Walleij [Thu, 21 Oct 2010 19:05:25 +0000 (21:05 +0200)]
spi/pl022: fix erroneous platform data in U300

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>
13 years agoInput: ir-keytable - fix uninitialized variable warning
Dmitry Torokhov [Sun, 31 Oct 2010 22:18:42 +0000 (15:18 -0700)]
Input: ir-keytable - fix uninitialized variable warning

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>
13 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Mon, 1 Nov 2010 01:03:23 +0000 (21:03 -0400)]
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* '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

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Mon, 1 Nov 2010 01:02:39 +0000 (21:02 -0400)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: appletouch - remove extra KERN_DEBUG use from dprintk
  Input: bu21013_ts - fix null dereference in error handling
  Input: ad7879 - prevent invalid finger data reports