platform/kernel/linux-rpi.git
12 years agoALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_* functions
Axel Lin [Mon, 30 Jan 2012 09:10:58 +0000 (17:10 +0800)]
ALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_* functions

This fixes below build warning when CONFIG_PCI is not set.

CC      sound/sound_core.o
In file included from sound/sound_core.c:15:
include/sound/core.h:454: warning: 'struct pci_dev' declared inside parameter list
include/sound/core.h:454: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Remove quirk for Asus N53Jq
David Henningsson [Fri, 27 Jan 2012 13:31:19 +0000 (14:31 +0100)]
ALSA: HDA: Remove quirk for Asus N53Jq

The user reports that he needs to add model=auto for audio to
work properly. In fact, since node 0x15 is not even a pin node,
the existing fixup is definitely wrong. Relevant information can
be found in the buglink below.

Cc: stable@kernel.org (3.2+)
BugLink: https://bugs.launchpad.net/bugs/918254
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix silent output on Haier W18 laptop
Takashi Iwai [Thu, 26 Jan 2012 14:56:16 +0000 (15:56 +0100)]
ALSA: hda - Fix silent output on Haier W18 laptop

The very same problem is seen on Haier W18 laptop with ALC861 as seen
on ASUS A6Rp, which was fixed by the commit 3b25eb69.
Now we just need to add a new SSID entry pointing to the same fixup.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42656

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSID
Gustavo Maciel Dias Vieira [Tue, 24 Jan 2012 15:27:56 +0000 (13:27 -0200)]
ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSID

HP laptop models with buggy BIOS are apparently frequent, including
machines with different codecs. Set the polarity of the mute led based
on the SSID and include an entry for the HP Mini 110-3100.

Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Tested-by: Predrag Ivanovic <predivan@open.telekom.rs>
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix silent output on ASUS A6Rp
Takashi Iwai [Wed, 25 Jan 2012 08:55:46 +0000 (09:55 +0100)]
ALSA: hda - Fix silent output on ASUS A6Rp

The refactoring of Realtek codec driver in 3.2 kernel caused a
regression for ASUS A6Rp laptop; it doesn't give any output.
The reason was that this machine has a secret master mute (or EAPD)
control via NID 0x0f VREF.  Setting VREF50 on this node makes the
sound working again.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42588

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Fix memory leak on error in snd_compr_set_params()
Jesper Juhl [Mon, 23 Jan 2012 20:02:57 +0000 (21:02 +0100)]
ALSA: Fix memory leak on error in snd_compr_set_params()

If copy_from_user() does not return 0 we'll leak the memory we
allocated for 'params' when that variable goes out of scope.

Also a small CodingStyle cleanup: Use braces on both branches of
if/else when one branch needs it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ymfpci - Don't create invalid PCM & mixers when AC97 doesn't support
Raymond Yau [Tue, 17 Jan 2012 03:41:47 +0000 (11:41 +0800)]
ALSA: ymfpci - Don't create invalid PCM & mixers when AC97 doesn't support

- check SDAC bit of AC97 primary codec when create "rear" device 3,
  "4ch" device 2 and "4ch Duplication" switch as the card need a four channels
  AC97 codec to support surround40.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops
Takashi Iwai [Mon, 23 Jan 2012 17:23:36 +0000 (18:23 +0100)]
ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops

The recent change of the power-widget handling for IDT codecs caused
the silent output from the docking-station line-out jack.  This was
partially fixed by the commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33
"ALSA: hda - Fix the lost power-setup of seconary pins after PM resume".
But the line-out on the docking-station is still silent when booted
with the jack plugged even by this fix.

The remainig bug is that the power-widget is set off in stac92xx_init()
because the pins in cfg->line_out_pins[] aren't checked there properly
but only hp_pins[] are checked in is_nid_hp_pin().

This patch fixes the problem by checking both HP and line-out pins
and leaving the power-map correctly.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Use model=auto for Thinkpad T510
David Henningsson [Mon, 23 Jan 2012 15:39:55 +0000 (16:39 +0100)]
ALSA: HDA: Use model=auto for Thinkpad T510

The user reports that model=auto works fine for him. Using
model=auto bring in new features such as jack detection notification
to userspace.

Alsa info is available at http://paste.ubuntu.com/805351/

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix buffer-alignment regression with Nvidia HDMI
Takashi Iwai [Mon, 23 Jan 2012 16:10:24 +0000 (17:10 +0100)]
ALSA: hda - Fix buffer-alignment regression with Nvidia HDMI

The commit 2ae66c26550cd94b0e2606a9275eb0ab7070ad0e
    ALSA: hda: option to enable arbitrary buffer/period sizes
introduced a regression on machines with Intel controller and Nvidia
HDMI.  The reason is that the driver modifies the global variable
align_buffer_size when an Intel controller is found, and the Nvidia
HDMI controller is probed after Intel although Nvidia chips require
the aligned buffers.

This patch fixes the problem by moving the flag into the local struct
so that it's not affected by other controllers.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42567

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix a unused variable warning
Takashi Iwai [Fri, 20 Jan 2012 11:14:12 +0000 (12:14 +0100)]
ALSA: hda - Fix a unused variable warning

Just overlooked.

sound/pci/hda/patch_realtek.c: In function ‘alc_sku_unsol_event’:
sound/pci/hda/patch_realtek.c:643:19: warning: unused variable ‘spec’ [-Wunused-variable]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agosnd-hda-intel: better Alienware M17x R3 quirk
Albert Pool [Thu, 19 Jan 2012 21:08:50 +0000 (22:08 +0100)]
snd-hda-intel: better Alienware M17x R3 quirk

I have been told that this way the rear headphone connector is
working as well; with model=alienware only laptop speakers work.
The subsystem of both controller and codec is 1028:0490.

Signed-off-by: Albert Pool <albertpool@solcon.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda/realtek - Remove use_jack_tbl field
Takashi Iwai [Thu, 19 Jan 2012 14:03:48 +0000 (15:03 +0100)]
ALSA: hda/realtek - Remove use_jack_tbl field

Now that all quirks have the own unsol handlers, we don't need to check
use_jack_tbl flag any more.  Let's kill it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda/realtek - Avoid conflict of unsol-events with static quirks
Takashi Iwai [Thu, 19 Jan 2012 11:10:29 +0000 (12:10 +0100)]
ALSA: hda/realtek - Avoid conflict of unsol-events with static quirks

The recently added jack-kctl support sets the unsol event tags
dynamically, while static quirks usually set the fixed tags in the
init_verbs array.  Due to this conflict, the own unsol event handler
can't retrieve the tag and handle it properly any more.

For fixing this, avoid calling snd_hda_jack_add_kctls() for static
quirks, and always let them use own handlers instead of the standard
one for the auto-pareser.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda/realtek - Avoid multi-ios conflicting with multi-speakers
Takashi Iwai [Thu, 19 Jan 2012 10:42:55 +0000 (11:42 +0100)]
ALSA: hda/realtek - Avoid multi-ios conflicting with multi-speakers

When a machine has multiple speakers, we don't need to create the
controls for multi-ios.  Check the number of primary outputs beforehand.

Note that this workaround might not work always with new codecs in
future; this assumes that both speakers and multi-io jacks share the
same mixers/DACs.  If they are routed with different mixers, the
individual mixer controls should be needed.  But, so far, this doesn't
happen with the existing ALC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: virtuoso: Xonar DS: fix polarity of front output
Clemens Ladisch [Sat, 14 Jan 2012 15:42:24 +0000 (16:42 +0100)]
ALSA: virtuoso: Xonar DS: fix polarity of front output

The two DACs for the front output and the surround/center/LFE/back
outputs are wired up out of phase, so when channels are duplicated,
their sound can cancel out each other and result in a weaker bass
response.  To fix this, reverse the polarity of the neutron flow to
the front output.

Reported-any-tested-by: Daniel Hill <daniel@enemyplanet.geek.nz>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.34+ <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Au88x0 - Reduce the number of playback subdevices of au8830 from 32 to 16
Raymond Yau [Fri, 13 Jan 2012 02:35:01 +0000 (10:35 +0800)]
ALSA: Au88x0 - Reduce the number of playback subdevices of au8830 from 32 to 16

- The maximum number of playback streams depend on the number of sample
  rate conveters (16) and the number of DMA channels (32).

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit
Raymond Yau [Fri, 13 Jan 2012 02:30:08 +0000 (10:30 +0800)]
ALSA: Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit

- Check SDAC bit of AC97 codec for supporting 4 channels playback.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Fix internal microphone on Dell Studio 16 XPS 1645
David Henningsson [Mon, 16 Jan 2012 09:52:20 +0000 (10:52 +0100)]
ALSA: HDA: Fix internal microphone on Dell Studio 16 XPS 1645

More than one user reports that changing the model from "both" to
"dmic" makes their Internal Mic work.

Cc: stable@kernel.org
Tested-by: Martin Ling <martin-launchpad@earth.li>
BugLink: https://bugs.launchpad.net/bugs/795823
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Don't prompt for CONFIG_SND_COMPRESS_OFFLOAD
Takashi Iwai [Fri, 13 Jan 2012 08:53:53 +0000 (09:53 +0100)]
ALSA: Don't prompt for CONFIG_SND_COMPRESS_OFFLOAD

CONFIG_SND_COMPRESS_OFFLOAD is an item to be selected by the dirver
just like CONFIG_SND_PCM, and no need to prompt for explicit
selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Use LPIB position fix for Macbook Pro 7,1
David Henningsson [Thu, 12 Jan 2012 15:31:14 +0000 (16:31 +0100)]
ALSA: HDA: Use LPIB position fix for Macbook Pro 7,1

Several users have reported "choppy" audio under the 3.2 kernel,
and that changing position_fix to 1 has resolved their problem.
The chip is an nVidia Corporation MCP89 High Definition Audio,
[10de:0d94] (rev a2).

Cc: stable@kernel.org (v3.2+)
BugLink: https://bugs.launchpad.net/bugs/909419
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Thu, 12 Jan 2012 08:59:18 +0000 (09:59 +0100)]
Merge branch 'topic/hda' into for-linus

12 years agoMerge branch 'topic/misc' into for-linus
Takashi Iwai [Thu, 12 Jan 2012 08:59:14 +0000 (09:59 +0100)]
Merge branch 'topic/misc' into for-linus

12 years agoMerge branch 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Thu, 12 Jan 2012 08:48:20 +0000 (09:48 +0100)]
Merge branch 'for-3.3' of git://git./linux/kernel/git/broonie/sound into topic/asoc

12 years agoMerge branch 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Wed, 11 Jan 2012 14:30:53 +0000 (15:30 +0100)]
Merge branch 'for-3.3' of git://git./linux/kernel/git/lrg/asoc into topic/asoc

12 years agoASoC: twl6040 - Add method to query optimum PDM_DL1 gain
Liam Girdwood [Wed, 11 Jan 2012 12:43:24 +0000 (12:43 +0000)]
ASoC: twl6040 - Add method to query optimum PDM_DL1 gain

The DL1 PDM interface adds a little gain depending on the output device.
Add a method to retrieve the gain value for machine driver usage.

Signed-off-by: Liam Girdwood <lrg@ti.com>
12 years agoALSA: hda - Fix the lost power-setup of seconary pins after PM resume
Takashi Iwai [Wed, 11 Jan 2012 11:34:11 +0000 (12:34 +0100)]
ALSA: hda - Fix the lost power-setup of seconary pins after PM resume

When multiple headphone or other detectable output pins are present,
the power-map has to be updated after resume appropriately, but the
current driver doesn't check all pins but only the first pin (since
it's enough to check it for the mute-behavior).  This resulted in the
silent output from the secondary outputs after PM resume.

This patch fixes the problem by checking all pins at (re-)init time.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: usb-audio: add Yamaha MOX6/MOX8 support
Clemens Ladisch [Mon, 19 Dec 2011 22:09:15 +0000 (23:09 +0100)]
ALSA: usb-audio: add Yamaha MOX6/MOX8 support

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: virtuoso: add S/PDIF input support for all Xonars
Clemens Ladisch [Tue, 6 Dec 2011 09:07:43 +0000 (10:07 +0100)]
ALSA: virtuoso: add S/PDIF input support for all Xonars

All Xonar cards support S/PDIF input, but the cards without optical or
coaxial plugs have only undocumented pin connectors.  Support for the
ST/STX was already added in a previous patch; this adds support for the
D1/DX (JP2), DG (J5), DS (J5), and HDAV Slim (J12).

Many thanks to Zoltan Miklos for testing the DS and DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ice1724 - Support for ooAoo SQ210a
Pavel Hofman [Tue, 10 Jan 2012 19:28:48 +0000 (20:28 +0100)]
ALSA: ice1724 - Support for ooAoo SQ210a

This card shares PCI ids with Chaintec AV710. Therefore, it will not be
detected automatically, it can only be activated by the module parameter
model=sq210a.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ice1724 - Allow card info based on model only
Pavel Hofman [Tue, 10 Jan 2012 19:28:47 +0000 (20:28 +0100)]
ALSA: ice1724 - Allow card info based on model only

When two different cards share the same PCI vendor/subvendor
identification, allow card info based on model only.
Do not require subvendor ID.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
Pavel Hofman [Tue, 10 Jan 2012 19:45:28 +0000 (20:45 +0100)]
ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations

Add the capture pcm only if there is at least one ADC configured in
the SYSCONF register.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hdspm - Provide unique driver id based on card serial
Adrian Knoth [Tue, 10 Jan 2012 19:58:40 +0000 (20:58 +0100)]
ALSA: hdspm - Provide unique driver id based on card serial

Before, /proc/asound looked like this:

 2 [Default        ]: HDSPM - RME RayDAT_f1cd85
                      RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18

In case of a second HDSPM card, its name would be Default_1. This is
cumbersome, because the order of the cards isn't stable across reboots.

To help userspace tools referring to the correct card, this commit
provides a unique id for each card:

 2 [HDSPMxf1cd85   ]: HDSPM - RME RayDAT_f1cd85
                      RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18

In this example, userspace (configuration files) would then use
hw:HDSPMxf1cd85 to choose the right card.

The serial is masked to 24bits, so this string is always shorter than
sixteen chars.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: Dynamically allocate the rtd device for a non-empty release()
Mark Brown [Sat, 7 Jan 2012 01:12:45 +0000 (17:12 -0800)]
ASoC: Dynamically allocate the rtd device for a non-empty release()

The device model needs a release() function so it can free devices when
they become dereferenced.  Do that for rtds.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
Axel Lin [Tue, 10 Jan 2012 06:19:12 +0000 (14:19 +0800)]
ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC

commit 739be96 "ASoC: Fix build dependency for SND_ATMEL_SOC_SSC"
introduces below build warnings:

drivers/misc/Kconfig:212:error: recursive dependency detected!
drivers/misc/Kconfig:212:       symbol ATMEL_SSC is selected by SND_ATMEL_SOC_SSC
sound/soc/atmel/Kconfig:9:      symbol SND_ATMEL_SOC_SSC is selected by SND_AT91_SOC_SAM9G20_WM8731
sound/soc/atmel/Kconfig:18:     symbol SND_AT91_SOC_SAM9G20_WM8731 depends on ATMEL_SSC

SND_ATMEL_SOC_SSC needs ATMEL_SSC to pass compilation.
This patch remove the "select ATMEL_SSC" from SND_ATMEL_SOC_SSC to avoid above
warnings. And then ensures all the machine drivers that select SND_ATMEL_SOC_SSC
need to depend on ATMEL_SSC.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
Takashi Iwai [Tue, 10 Jan 2012 14:16:02 +0000 (15:16 +0100)]
ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs

Currently the driver checks only the out_mix_path[] for the primary
output route for judging whether to create the loopback-mixing control
or not.  But, there are cases where aamix-routing is available only on
headphone or speaker paths but not on the primary output path.  So, the
driver ignores such cases inappropriately.

This patch fixes the check of the loopback-mixing control by testing
all mix-routing paths.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
Takashi Iwai [Tue, 10 Jan 2012 11:41:22 +0000 (12:41 +0100)]
ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs

When an invalid NID is given, get_wcaps() returns zero as the error,
but get_wcaps_type() takes it as the normal value and returns a bogus
AC_WID_AUD_OUT value.  This confuses the parser.

With this patch, get_wcaps_type() returns -1 when value 0 is given,
i.e. an invalid NID is passed to get_wcaps().

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740118

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Use auto-parser for HP laptops with cx20459 codec
Takashi Iwai [Tue, 10 Jan 2012 07:59:56 +0000 (08:59 +0100)]
ALSA: hda - Use auto-parser for HP laptops with cx20459 codec

These laptops can work well with the auto-parser and their BIOS setups,
and in addition, the auto-parser fixes the problem with S3/S4 where
the unsol event handling is killed after resume due to fallback to the
single-cmd mode.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115

Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
Takashi Iwai [Mon, 9 Jan 2012 17:26:05 +0000 (18:26 +0100)]
ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()

Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_asihpi_cmode_info() may lead to Oops.  This function should
return an error immediately in such a case instead.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
Takashi Iwai [Mon, 9 Jan 2012 17:22:35 +0000 (18:22 +0100)]
ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()

Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_hdsp_info_pref_sync_ref() may lead to Oops.  This function should
return an error immediately in such a case instead.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda/cirrus - support for iMac12,2 model
Jérémy Lal [Mon, 9 Jan 2012 16:19:45 +0000 (17:19 +0100)]
ALSA: hda/cirrus - support for iMac12,2 model

This early 2011 model just need to have headphones on GPI02
instead of GPI01, and use BIOS pincfgs.
It is detected by codec SSID.
The iMac12,1 model is known to work the same way, although maybe
not with the same codec SSID.

Signed-off-by: Jérémy Lal <kapouer@melix.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: cx20442: add bias control over a platform provided regulator
Janusz Krzysztofik [Fri, 30 Dec 2011 03:04:54 +0000 (04:04 +0100)]
ASoC: cx20442: add bias control over a platform provided regulator

Now that a regulator device for controlling the codec chip reset state
over a platform agnostic regulator API is available on the only board
using this driver so far, extend the driver with a bias control function
which will request virtual power to the codec chip from that virtual
regulator, and will supersede the present implementation existing at the
sound card level.

Thanks to the regulator sharing mechanism, both the old (the sound card)
and the new (the codec) implementations should coexist smoothly until
the sound card file is updated. For this to work as expected, update the
sound card .set_bias_level callback to not touch codec->dapm.bias_level.

While extending the cx20442 structure, drop unused control_type member.

Created against linxu-3.2-rc6, tested on top of patch 1/4 "ARM: OMAP1:
ams-delta: set up a regulator over the modem reset GPIO pin".

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
12 years agoALSA: usb-audio - Avoid flood of frame-active debug messages
Takashi Iwai [Mon, 9 Jan 2012 10:37:20 +0000 (11:37 +0100)]
ALSA: usb-audio - Avoid flood of frame-active debug messages

With some buggy devices, the usb-audio driver may give "frame xxx active"
kernel messages too often.  Better to keep it as debug-only using
snd_printdd(), and also add the rate-limit for avoiding floods.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738681

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: snd-usb-us122l: Delete calls to preempt_disable
Karsten Wiese [Fri, 30 Dec 2011 00:42:01 +0000 (01:42 +0100)]
ALSA: snd-usb-us122l: Delete calls to preempt_disable

They are not needed here.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agomfd: Put WM8994 into cache only mode when suspending
Mark Brown [Mon, 9 Jan 2012 08:36:42 +0000 (00:36 -0800)]
mfd: Put WM8994 into cache only mode when suspending

This is required by the ASoC driver for very low power modes where the
device is fully idle but we want to update controls.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix idma build after update for channel count check
Mark Brown [Mon, 9 Jan 2012 06:50:00 +0000 (22:50 -0800)]
ASoC: Fix idma build after update for channel count check

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoALSA: hdspm - Refactor serial number to avoid code duplication
Adrian Knoth [Wed, 4 Jan 2012 13:31:16 +0000 (14:31 +0100)]
ALSA: hdspm - Refactor serial number to avoid code duplication

The serial number is used multiple times in hdspm.c. Since it belongs
to the card, let's store it in struct hdspm and refer to it whenever
necessary.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range()
Xi Wang [Sun, 8 Jan 2012 14:02:52 +0000 (09:02 -0500)]
ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range()

A malicious USB device may feed in carefully crafted min/max/res values,
so that the inner loop in parse_uac2_sample_rate_range() could run for
a long time or even never terminate, e.g., given max = INT_MAX.

Also nr_rates could be a large integer, which causes an integer overflow
in the subsequent call to kmalloc() in parse_audio_format_rates_v2().
Thus, kmalloc() would allocate a smaller buffer than expected, leading
to a memory corruption.

To exploit the two vulnerabilities, an attacker needs physical access
to the machine to plug in a malicious USB device.

This patch makes two changes.

1) The type of "rate" is changed to unsigned int, so that the loop could
   stop once "rate" is larger than INT_MAX.

2) Limit nr_rates to 1024.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Au88x0 - Fix channels swapping of 4 channels playback
Raymond Yau [Sat, 7 Jan 2012 06:35:17 +0000 (14:35 +0800)]
ALSA: Au88x0 - Fix channels swapping of 4 channels playback

Fix channels swapping of 4 channels playback by
using vortex_adbdma_stopfifo instead of vortex_adbdma_pausefifo
for SNDRV_PCM_TRIGGER_STOP event

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Au88x0 - Fix IRQ fifo error and channels swap of 4 channels playback
Raymond Yau [Fri, 6 Jan 2012 01:19:29 +0000 (09:19 +0800)]
ALSA: Au88x0 - Fix IRQ fifo error and channels swap of 4 channels playback

Fix IRQ fifo error when playing stereo by set stereo flag of fifo control.
This also fix the swap of front and rear channels on au8830.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Au88x0 - Fix Xtalk's constants
Raymond Yau [Wed, 4 Jan 2012 08:16:26 +0000 (16:16 +0800)]
ALSA: Au88x0 - Fix Xtalk's constants

- Fix XtalkGainsDefault, XtalkGains1Chn
- Fix XtalkWideCoefsLeftEQ, XtalkWideCoefsRightEQ
- Fix XtlakWideCoefsLeftXT, XtalkWideCoefsRightXT

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Au88x0 - Xtalk - fix write/read of eq and xt instates
Raymond Yau [Wed, 4 Jan 2012 07:42:44 +0000 (15:42 +0800)]
ALSA: Au88x0 - Xtalk - fix write/read of eq and xt instates

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ice1724 - External clock item only for cards with SPDIF_IN
Pavel Hofman [Thu, 5 Jan 2012 21:01:56 +0000 (22:01 +0100)]
ALSA: ice1724 - External clock item only for cards with SPDIF_IN

Append the external clock item to the clock list only if
the SPDIF_IN capability is defined in the SPDIF register.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ice1724 - Check for ac97 to avoid kernel oops
Pavel Hofman [Thu, 5 Jan 2012 22:05:18 +0000 (23:05 +0100)]
ALSA: ice1724 - Check for ac97 to avoid kernel oops

Cards with identical PCI ids but no AC97 config in EEPROM do not have
the ac97 field initialized. We must check for this case to avoid kernel oops.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Remove Poulsbo position fix quirks
David Henningsson [Wed, 4 Jan 2012 09:48:27 +0000 (10:48 +0100)]
ALSA: HDA: Remove Poulsbo position fix quirks

Now that we have changed the poulsbo chip to use LPIB position fix,
we can remove the individual machine quirks that do the same thing.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Fix typo for ALC269VB_FIXUP_DMIC
David Henningsson [Tue, 3 Jan 2012 07:45:56 +0000 (08:45 +0100)]
ALSA: HDA: Fix typo for ALC269VB_FIXUP_DMIC

This fixup is not actually used, so in practice this is just a
cosmetic fix.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Add support for Cirrus Logic 4213
David Henningsson [Mon, 2 Jan 2012 11:40:17 +0000 (12:40 +0100)]
ALSA: HDA: Add support for Cirrus Logic 4213

The CS4213 chip is similar to the CS4210, but it does not have
SPDIF capabilities. Also, it has fewer pins, and the vendor specific
nid is different. With this patch, we have working inputs and outputs
(and automute/autoswitch). However, we don't know anything about
the vendor specific processing coefficients, so we don't read or write
to that node in this patch.

BugLink: https://bugs.launchpad.net/bugs/910792
Tested-by: Hsin-Yi Chen <hychen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Fix automute for Cirrus Logic 421x
David Henningsson [Mon, 2 Jan 2012 11:40:16 +0000 (12:40 +0100)]
ALSA: HDA: Fix automute for Cirrus Logic 421x

There was a bug in the automute logic causing speakers not to
mute when headphones were plugged in.

Cc: stable@kernel.org
Tested-by: Hsin-Yi Chen <hychen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Fix master control for Cirrus Logic 421X
David Henningsson [Mon, 2 Jan 2012 11:40:15 +0000 (12:40 +0100)]
ALSA: HDA: Fix master control for Cirrus Logic 421X

The control name "HP/Speakers" is non-standard, and since there is
only one DAC on this chip there is no need for a virtual master
anyway.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: HDA: Use LPIB position fix for Oaktrail
David Henningsson [Wed, 4 Jan 2012 09:12:54 +0000 (10:12 +0100)]
ALSA: HDA: Use LPIB position fix for Oaktrail

According to the thread on alsa-devel, the LPIB method is to prefer
for Oaktrail controller chip.

Reference: http://mailman.alsa-project.org/pipermail/alsa-devel/2012-January/047800.html

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: check for substream not channels_min in pcm engines
Joachim Eastwood [Sun, 1 Jan 2012 00:58:44 +0000 (01:58 +0100)]
ASoC: check for substream not channels_min in pcm engines

This is a follow up on 53dea36c70c1857 which fixes the other affected
pcm engines.

Description from 53dea36c70c1857:
 Don't rely on the codec's channels_min information to decide wheter or
 not allocate a substream's DMA buffer. Rather check if the substream
 itself was allocated previously.

Without this patch I was seeing null-pointer dereferenc in atmel-pcm.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix build dependency for SND_ATMEL_SOC_SSC
Axel Lin [Fri, 6 Jan 2012 06:54:24 +0000 (14:54 +0800)]
ASoC: Fix build dependency for SND_ATMEL_SOC_SSC

Make SND_ATMEL_SOC_SSC select ATMEL_SSC to fix below build errors:

  LD      .tmp_vmlinux1
sound/built-in.o: In function `atmel_ssc_remove':
sound/soc/atmel/atmel_ssc_dai.c:713: undefined reference to `ssc_free'
sound/built-in.o: In function `atmel_ssc_probe':
sound/soc/atmel/atmel_ssc_dai.c:700: undefined reference to `ssc_request'
sound/built-in.o: In function `atmel_ssc_set_audio':
sound/soc/atmel/atmel_ssc_dai.c:845: undefined reference to `ssc_request'
sound/soc/atmel/atmel_ssc_dai.c:851: undefined reference to `ssc_free'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: sta32x: Optimize the array work to find rate_min and rate_max
Axel Lin [Sun, 1 Jan 2012 10:36:14 +0000 (18:36 +0800)]
ASoC: sta32x: Optimize the array work to find rate_min and rate_max

For a given ir and fs, there is at most one possible match for the case
mclk_ratios[ir][j].ratio * fs == freq.
Thus we can break from the inner loop once a match is found.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: soc-pcm: Allocate PCM operations dynamically to support multiple DAIs
Sangsu Park [Mon, 2 Jan 2012 08:15:10 +0000 (17:15 +0900)]
ASoC: soc-pcm: Allocate PCM operations dynamically to support multiple DAIs

The original code does not cover the case that two DAIs(CPU) have different
ASoC core PCM operations(like mmap, pointer...). Currently we have only one
global soc_pcm_ops for ASoC core PCM operation. When two DAIs have different
pointer functions, second DAI's pointer function is set for both first DAI
and second DAI in case of original code.

This patch uses runtime's pcm_ops instead of global pcm_ops for each DAIs. So
each DAIs can have different ASoC core PCM operations. This is needed to
support multiple DAIs.

Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: pxa: Convert corgi to use snd_soc_register_card()
Axel Lin [Fri, 30 Dec 2011 03:18:13 +0000 (11:18 +0800)]
ASoC: pxa: Convert corgi to use snd_soc_register_card()

Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix return value of wm8580_set_sysclk()
Axel Lin [Fri, 30 Dec 2011 15:36:23 +0000 (23:36 +0800)]
ASoC: Fix return value of wm8580_set_sysclk()

We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Use dai_fmt in tavorevb3 machine driver
Axel Lin [Fri, 30 Dec 2011 15:43:44 +0000 (23:43 +0800)]
ASoC: Use dai_fmt in tavorevb3 machine driver

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix return value of wm8903_gpio_direction_in() and wm8903_gpio_direction_out()
Axel Lin [Sat, 31 Dec 2011 03:01:41 +0000 (11:01 +0800)]
ASoC: Fix return value of wm8903_gpio_direction_in() and wm8903_gpio_direction_out()

We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert z2 to table based DAPM init
Axel Lin [Sat, 31 Dec 2011 00:45:49 +0000 (08:45 +0800)]
ASoC: Convert z2 to table based DAPM init

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert tavorevb3 to table based DAPM init
Axel Lin [Sat, 31 Dec 2011 00:45:01 +0000 (08:45 +0800)]
ASoC: Convert tavorevb3 to table based DAPM init

Also remove a unsued ret variable to silence the build warning.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert spitz to table based DAPM and control init
Axel Lin [Sat, 31 Dec 2011 00:44:04 +0000 (08:44 +0800)]
ASoC: Convert spitz to table based DAPM and control init

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert saarb to table based DAPM init
Axel Lin [Sat, 31 Dec 2011 00:40:30 +0000 (08:40 +0800)]
ASoC: Convert saarb to table based DAPM init

Also remove a unused ret variable to silence the build warning.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Use dai_fmt in z2 machine driver
Axel Lin [Fri, 30 Dec 2011 15:44:37 +0000 (23:44 +0800)]
ASoC: Use dai_fmt in z2 machine driver

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Use dai_fmt in spitz machine driver
Axel Lin [Fri, 30 Dec 2011 15:42:55 +0000 (23:42 +0800)]
ASoC: Use dai_fmt in spitz machine driver

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Use dai_fmt in saarb machine driver
Axel Lin [Fri, 30 Dec 2011 15:41:54 +0000 (23:41 +0800)]
ASoC: Use dai_fmt in saarb machine driver

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix return value of wm8962_gpio_direction_out()
Axel Lin [Fri, 30 Dec 2011 15:38:03 +0000 (23:38 +0800)]
ASoC: Fix return value of wm8962_gpio_direction_out()

We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix return value of ak4641_pcm_set_dai_fmt()
Axel Lin [Fri, 30 Dec 2011 15:34:54 +0000 (23:34 +0800)]
ASoC: Fix return value of ak4641_pcm_set_dai_fmt()

We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ac97c.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:29 +0000 (17:51 +0100)]
ASoC: ac97c.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dbdma2.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:28 +0000 (17:51 +0100)]
ASoC: dbdma2.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dma.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:27 +0000 (17:51 +0100)]
ASoC: dma.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: i2sc.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:26 +0000 (17:51 +0100)]
ASoC: i2sc.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: psc-ac97.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:25 +0000 (17:51 +0100)]
ASoC: psc-ac97.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: psc-i2s.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:24 +0000 (17:51 +0100)]
ASoC: psc-i2s.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: davinci-i2s.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:22 +0000 (17:51 +0100)]
ASoC: davinci-i2s.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

In this case, the original code did not contain a call to iounmap, nor does
one appear anywhere else in the file.  I have assumed that it is safe to
use devm_ioremap for the allocation in any case.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: davinci-mcasp.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:21 +0000 (17:51 +0100)]
ASoC: davinci-mcasp.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

In this case, the original code did not contain a call to iounmap, nor does
one appear anywhere else in the file.  I have assumed that it is safe to
use devm_ioremap for the allocation in any case.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: davinci-vcif.c: use devm_ functions
Julia Lawall [Thu, 29 Dec 2011 16:51:20 +0000 (17:51 +0100)]
ASoC: davinci-vcif.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert tpa6130a2 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:12:29 +0000 (12:12 +0800)]
ASoC: Convert tpa6130a2 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert tlv320dac33 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:11:00 +0000 (12:11 +0800)]
ASoC: Convert tlv320dac33 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert cs4270 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 03:58:22 +0000 (11:58 +0800)]
ASoC: Convert cs4270 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert alc5623 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 03:56:23 +0000 (11:56 +0800)]
ASoC: Convert alc5623 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert tlv320aic3x to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:10:04 +0000 (12:10 +0800)]
ASoC: Convert tlv320aic3x to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert tlv320aic26 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:08:36 +0000 (12:08 +0800)]
ASoC: Convert tlv320aic26 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert tlv320aic23 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:07:30 +0000 (12:07 +0800)]
ASoC: Convert tlv320aic23 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert sta32x to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:06:39 +0000 (12:06 +0800)]
ASoC: Convert sta32x to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert ssm2602 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:05:20 +0000 (12:05 +0800)]
ASoC: Convert ssm2602 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert rt5631 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:04:15 +0000 (12:04 +0800)]
ASoC: Convert rt5631 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert max9850 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:03:16 +0000 (12:03 +0800)]
ASoC: Convert max9850 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert max98095 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:02:21 +0000 (12:02 +0800)]
ASoC: Convert max98095 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert max98088 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:01:07 +0000 (12:01 +0800)]
ASoC: Convert max98088 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert cs42l51 to devm_kzalloc()
Axel Lin [Thu, 29 Dec 2011 04:00:13 +0000 (12:00 +0800)]
ASoC: Convert cs42l51 to devm_kzalloc()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>