]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Fri, 23 Sep 2011 05:19:22 +0000 (07:19 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: fm801 - Clean up redundant reference to snd_fm801_tea575x_gpios[]
Takashi Iwai [Thu, 22 Sep 2011 14:54:23 +0000 (16:54 +0200)]
ALSA: fm801 - Clean up redundant reference to snd_fm801_tea575x_gpios[]

Use macro to improve readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'fix/misc' into topic/misc
Takashi Iwai [Thu, 22 Sep 2011 14:41:52 +0000 (16:41 +0200)]
Merge branch 'fix/misc' into topic/misc

13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Thu, 22 Sep 2011 14:40:44 +0000 (16:40 +0200)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: fm801: Gracefully handle failure of tuner auto-detect
Ben Hutchings [Thu, 22 Sep 2011 13:39:52 +0000 (14:39 +0100)]
ALSA: fm801: Gracefully handle failure of tuner auto-detect

Commit 9676001559fce06e37c7dc230ab275f605556176
("ALSA: fm801: add error handling if auto-detect fails") seems to
break systems that were previously working without a tuner.

As a bonus, this should fix init and cleanup for the case where the
tuner is explicitly disabled.

Reported-and-tested-by: Hor Jiun Shyong <jiunshyong@gmail.com>
References: http://bugs.debian.org/641946
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org [v3.0+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: fm801: Fix double free in case of error in tuner detection
Ben Hutchings [Thu, 22 Sep 2011 13:38:58 +0000 (14:38 +0100)]
ALSA: fm801: Fix double free in case of error in tuner detection

Commit 9676001559fce06e37c7dc230ab275f605556176
("ALSA: fm801: add error handling if auto-detect fails") added
incorrect error handling.

Once we have successfully called snd_device_new(), the cleanup
function fm801_free() will automatically be called by snd_card_free()
and we must *not* also call fm801_free() directly.

Reported-by: Hor Jiun Shyong <jiunshyong@gmail.com>
References: http://bugs.debian.org/641946
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org [v3.0+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/remove-irqf_disable' into for-next
Takashi Iwai [Thu, 22 Sep 2011 09:34:24 +0000 (11:34 +0200)]
Merge branch 'topic/remove-irqf_disable' into for-next

13 years agosound: irq: Remove IRQF_DISABLED
Yong Zhang [Thu, 22 Sep 2011 08:59:20 +0000 (16:59 +0800)]
sound: irq: Remove IRQF_DISABLED

Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/asoc' into topic/remove-irqf_disable
Takashi Iwai [Thu, 22 Sep 2011 07:56:12 +0000 (09:56 +0200)]
Merge branch 'topic/asoc' into topic/remove-irqf_disable

13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Wed, 21 Sep 2011 08:31:24 +0000 (10:31 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: hda: hdmi: Hint matching between input devices and pcm devices
David Henningsson [Tue, 23 Aug 2011 14:56:03 +0000 (16:56 +0200)]
ALSA: hda: hdmi: Hint matching between input devices and pcm devices

Since modern HDMI cards often have more than one output pin and thus
input device, we need to know which one has actually been plugged in.

This patch adds a name hint that indicates which PCM device is connected
to which pin.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Tue, 20 Sep 2011 17:21:19 +0000 (19:21 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: HDA: Refactor Realtek's automute
David Henningsson [Tue, 20 Sep 2011 10:04:56 +0000 (12:04 +0200)]
ALSA: HDA: Refactor Realtek's automute

Increase readability and understandability in the automute code.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Tue, 20 Sep 2011 14:45:49 +0000 (16:45 +0200)]
Merge branch 'topic/asoc' into for-next

13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Tue, 20 Sep 2011 11:59:35 +0000 (12:59 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: ssm2602: Do not dereference codec->control_data
Lars-Peter Clausen [Tue, 20 Sep 2011 06:19:58 +0000 (08:19 +0200)]
ASoC: ssm2602: Do not dereference codec->control_data

The driver assumes that control_data points to the drivers i2c_client struct,
but this is no longer the case since the ASoC core has switched to regmap.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: fsl: Fix error handling if platform_device_add fails
Axel Lin [Tue, 20 Sep 2011 07:09:00 +0000 (15:09 +0800)]
ASoC: fsl: Fix error handling if platform_device_add fails

Call platform_device_put() instead of platform_device_unregister() if
platform_device_add() fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove bitrotted wm8962_resume()
Mark Brown [Mon, 19 Sep 2011 22:33:35 +0000 (23:33 +0100)]
ASoC: Remove bitrotted wm8962_resume()

This functionality is now subsumed within the bias management, using the
standard cache management functionality, without assuming the cache type.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Refcount WM8996 bandgap from FLL too
Mark Brown [Mon, 19 Sep 2011 17:50:05 +0000 (18:50 +0100)]
ASoC: Refcount WM8996 bandgap from FLL too

For digital only paths we need to make sure the bandgap is enabled prior
to starting the FLL which isn't tied into DAPM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Fix unused variable warning in WM8996
Mark Brown [Mon, 19 Sep 2011 15:16:08 +0000 (16:16 +0100)]
ASoC: Fix unused variable warning in WM8996

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Tue, 20 Sep 2011 07:14:04 +0000 (09:14 +0200)]
Merge branch 'fix/hda' into topic/hda

13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Tue, 20 Sep 2011 07:13:53 +0000 (09:13 +0200)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: HDA: Add support for IDT 92HD93
David Henningsson [Tue, 20 Sep 2011 07:02:22 +0000 (09:02 +0200)]
ALSA: HDA: Add support for IDT 92HD93

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/854468
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Tue, 20 Sep 2011 06:59:09 +0000 (08:59 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: via82xx: allow to disable the SRC
Clemens Ladisch [Fri, 16 Sep 2011 21:16:05 +0000 (23:16 +0200)]
ALSA: via82xx: allow to disable the SRC

Add the PCM rule to allow disabling the PCM playback SRC.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: emu10k1: allow to disable the SRC
Clemens Ladisch [Fri, 16 Sep 2011 21:13:38 +0000 (23:13 +0200)]
ALSA: emu10k1: allow to disable the SRC

Add the PCM rule to allow disabling the PCM playback SRC.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: ymfpci: allow to disable the SRC
Clemens Ladisch [Fri, 16 Sep 2011 21:08:28 +0000 (23:08 +0200)]
ALSA: ymfpci: allow to disable the SRC

Add the PCM rules to allow disabling the PCM playback and capture SRCs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: pcm: add snd_pcm_hw_rule_noresample()
Clemens Ladisch [Fri, 16 Sep 2011 21:03:02 +0000 (23:03 +0200)]
ALSA: pcm: add snd_pcm_hw_rule_noresample()

Add a helper function to allow drivers to disable hardware resampling
when the application has specified the SNDRV_PCM_HW_PARAMS_NORESAMPLE
flag.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: ymfpci: fix PCM open error handling
Clemens Ladisch [Fri, 16 Sep 2011 20:52:48 +0000 (22:52 +0200)]
ALSA: ymfpci: fix PCM open error handling

The installation of the minimum period size constraint in the PCM open
callbacks was not checked for errors.  Add this check, and move the call
to the beginning of the function to avoid having to do any cleanups in
the error case.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: twl6040: Correct supported number of playback channels
Peter Ujfalusi [Thu, 15 Sep 2011 12:59:19 +0000 (15:59 +0300)]
ASoC: twl6040: Correct supported number of playback channels

twl6040 supports 5 playback, and 2 capture channels

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Fix the number of channels for vibra
Peter Ujfalusi [Thu, 15 Sep 2011 12:59:18 +0000 (15:59 +0300)]
ASoC: twl6040: Fix the number of channels for vibra

Only mono audio can be used for vibra (DL4 channel).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Use chip defaults in the initial reg_cache
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:28 +0000 (15:39 +0300)]
ASoC: twl6040: Use chip defaults in the initial reg_cache

Reset the twl6040_reg array to hold the chip default values.
The only changed values were for the microphone input selection.
Select no input for the microphones in the twl6040_init_chip function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Chip initialization cleanup
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:27 +0000 (15:39 +0300)]
ASoC: twl6040: Chip initialization cleanup

There is no need to write to the vio registers at probe time, since most
them either read only, or shared with MFD or not used.
On the other hand it is a good idea to updated the ASICREV register in
the cache at this time.

After power up we need to restore some registers. Clean up the list to
contain only the registers we are going to restore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMFD: twl6040: Fix power on GPIO handling
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:26 +0000 (15:39 +0300)]
MFD: twl6040: Fix power on GPIO handling

Avoid requesting the audpwron gpio in case of ES1.0
revision.
In the past we requested the gpio, but we did not
free it up, since we made the check for the revision
later. This results later checks for gpio validity to
fail, leaving the gpio reserved (even after the driver
has been removed).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoInput: twl6040-vibra: Use accessor to get revision information
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:25 +0000 (15:39 +0300)]
Input: twl6040-vibra: Use accessor to get revision information

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMFD: twl6040: Add accessor for revision ID
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:24 +0000 (15:39 +0300)]
MFD: twl6040: Add accessor for revision ID

For client driver to use, if they need chip resvision information.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMFD: twl6040: Remove global pointer for platform_device
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:23 +0000 (15:39 +0300)]
MFD: twl6040: Remove global pointer for platform_device

There is no need to keep global pointer for the platform
device, since it is only used for dev_* prints, and the
device pointer available within the twl6040 structure.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: mxs-saif: add record function
Dong Aisheng [Wed, 7 Sep 2011 12:51:50 +0000 (20:51 +0800)]
ASoC: mxs-saif: add record function

1. add different clkmux mode handling
SAIF can use two instances to implement full duplex (playback &
recording) and record saif may work on EXTMASTER mode which is
using other saif's BITCLK&LRCLK.

The clkmux mode could be set in pdata->init() in mach-specific code.
For generic saif driver, it only needs to know who is his master
and the master id is also provided in mach-specific code.

2. support playback and capture simutaneously however the sample
rates can not be different due to hw limitation.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sn95031: Staticize sn95031_pcm_hw_params
Axel Lin [Mon, 19 Sep 2011 08:34:28 +0000 (16:34 +0800)]
ASoC: sn95031: Staticize sn95031_pcm_hw_params

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add line loads to the list of supported detections for Speyside
Mark Brown [Sun, 4 Sep 2011 14:54:55 +0000 (07:54 -0700)]
ASoC: Add line loads to the list of supported detections for Speyside

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Initial WM8996 headphone impedance measurement support
Mark Brown [Sun, 4 Sep 2011 14:50:31 +0000 (07:50 -0700)]
ASoC: Initial WM8996 headphone impedance measurement support

The WM8996 can measure the impedance of accessories connected to the
headphone output. Implement initial support for this, measuring the
left channel impedance when an accessory is detected and using this
to distinguish between a line load and a headphone load.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: WM8996 only needs bandgap for analogue functionality
Mark Brown [Fri, 16 Sep 2011 16:55:06 +0000 (17:55 +0100)]
ASoC: WM8996 only needs bandgap for analogue functionality

Rather than managing the bandgap in the bias level control use a supply
widget as we only actually need to enable it for analogue paths, not
fully digital ones.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Display the error code when we fail to add a DAPM control
Mark Brown [Mon, 5 Sep 2011 17:51:05 +0000 (10:51 -0700)]
ASoC: Display the error code when we fail to add a DAPM control

Useful for diagnostics.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Mon, 19 Sep 2011 09:36:46 +0000 (11:36 +0200)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda/realtek - Fix auto-mute with HP+LO configuration
Takashi Iwai [Mon, 19 Sep 2011 09:31:34 +0000 (11:31 +0200)]
ALSA: hda/realtek - Fix auto-mute with HP+LO configuration

When the system has only the headphone and the line-out jacks without
speakers, the current auto-mute code doesn't work.  It's because the
spec->automute_lines flag is wrongly referred in update_speakers().
This flag must be meaningless when spec->automute_hp_lo isn't set, thus
they should be always coupled.

The patch fixes the problem and add a comment to indicate the
relationship briefly.

BugLink: http://bugs.launchpad.net/bugs/851697
Reported-by: David Henningsson <david.henningsson@canonical.com>
Tested-By: Jayne Han <jayne.han@canonical.com>
Cc: stable@kernel.org (3.0)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: support all possible sample rates in the WM8776 driver
Timur Tabi [Fri, 16 Sep 2011 14:16:54 +0000 (09:16 -0500)]
ASoC: support all possible sample rates in the WM8776 driver

The WM8776 supports a continuous range of sample rates rather than
discrete values and supports a wider range of sample rates on the
playback path than is currently supported.  Update the constraints on
the DAIs to reflect this.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8995: Remove unused i2c variable in wm8995_remove()
Axel Lin [Fri, 16 Sep 2011 02:47:37 +0000 (10:47 +0800)]
ASoC: wm8995: Remove unused i2c variable in wm8995_remove()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8995: Return -EINVAL if device ID mismatch
Axel Lin [Fri, 16 Sep 2011 02:46:33 +0000 (10:46 +0800)]
ASoC: wm8995: Return -EINVAL if device ID mismatch

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tpa6130a2: Remove obsolete cleanup for clientdata
Axel Lin [Fri, 9 Sep 2011 08:47:00 +0000 (16:47 +0800)]
ASoC: tpa6130a2: Remove obsolete cleanup for clientdata

The i2c core will clear the clientdata pointer automatically,
we don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: davinci-pcm: trivial: replace link with actual chan/link
Ben Gardiner [Fri, 9 Sep 2011 21:06:05 +0000 (17:06 -0400)]
ASoC: davinci-pcm: trivial: replace link with actual chan/link

The ambiguously named variable 'link' is used as a temporary throughout
davinci-pcm -- its presence makes grepping (and groking) the code
difficult.

Replace link with the value of link in almost all sites. The exception
is a couple places where the last-assigned link/chan needs to be
returned by a function -- in these cases, rename to last_link.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: edb93xx: convert to use snd_soc_register_card()
Mika Westerberg [Sun, 11 Sep 2011 09:28:51 +0000 (12:28 +0300)]
ASoC: edb93xx: convert to use snd_soc_register_card()

Current method for machine driver to register with the ASoC core is to use
snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: simone: convert to use snd_soc_register_card()
Mika Westerberg [Sun, 11 Sep 2011 09:28:50 +0000 (12:28 +0300)]
ASoC: simone: convert to use snd_soc_register_card()

Current method for machine driver to register with the ASoC core is to
use snd_soc_register_card() instead of creating a "soc-audio" platform device.

In addition we use platform_device_register_simple() to create a platform
device for the codec. This function will handle putting and deleting the
device automatically which simplifies the error handling in the machine
driver.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ep93xx-pcm: add MODULE_ALIAS
Mika Westerberg [Sun, 11 Sep 2011 09:28:49 +0000 (12:28 +0300)]
ASoC: ep93xx-pcm: add MODULE_ALIAS

To get the PCM module loaded automatically by udev et al. we need to add a
proper MODULE_ALIAS.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoARM: ep93xx: snappercl15: register audio platform device
Mika Westerberg [Sun, 11 Sep 2011 09:28:55 +0000 (12:28 +0300)]
ARM: ep93xx: snappercl15: register audio platform device

Since the ASoC machine driver is now a platform driver we need to register a
matching platform device.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoARM: ep93xx: edb93xx: register audio platform device
Mika Westerberg [Sun, 11 Sep 2011 09:28:54 +0000 (12:28 +0300)]
ARM: ep93xx: edb93xx: register audio platform device

Since the ASoC machine driver is now a platform driver we need to register a
matching platform device.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoARM: ep93xx: simone: register audio platform device
Mika Westerberg [Sun, 11 Sep 2011 09:28:53 +0000 (12:28 +0300)]
ARM: ep93xx: simone: register audio platform device

Since the ASoC machine driver is now a platform driver we need to register
a matching platform device.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: snappercl15: convert to use snd_soc_register_card()
Mika Westerberg [Sun, 11 Sep 2011 09:28:52 +0000 (12:28 +0300)]
ASoC: snappercl15: convert to use snd_soc_register_card()

Current method for machine driver to register with the ASoC core is to use
snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: support sample sizes properly in the WM8776 codec driver
Timur Tabi [Tue, 13 Sep 2011 17:59:35 +0000 (12:59 -0500)]
ASoC: support sample sizes properly in the WM8776 codec driver

Use snd_pcm_format_width() to determine the sample size, instead of
checking specify sample formats and assuming that those are the only
valid format.

This change adds support for big-endian architectures (which use the _BE
formats) and the packed 24-bit format (SNDRV_PCM_FORMAT_S24_3xE).

[Fixed single letter variable name legibility problem -- broonie]

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Fri, 16 Sep 2011 06:34:16 +0000 (08:34 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: usb-audio: Added support for Roland UM-ONE midi-usb interface
Daniele Guerrieri [Fri, 16 Sep 2011 06:31:45 +0000 (08:31 +0200)]
ALSA: usb-audio: Added support for Roland UM-ONE midi-usb interface

Roland UM-ONE midi usb interface differs from Roland UM-1.

Signed-off-by: Daniele Guerrieri <d.guerrieri@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'fix/misc' into topic/misc
Takashi Iwai [Fri, 16 Sep 2011 06:29:04 +0000 (08:29 +0200)]
Merge branch 'fix/misc' into topic/misc

13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Thu, 15 Sep 2011 23:54:25 +0000 (00:54 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: Fix WM8996 DC servo operation without IRQ
Mark Brown [Thu, 15 Sep 2011 09:52:11 +0000 (10:52 +0100)]
ASoC: Fix WM8996 DC servo operation without IRQ

We need to count the timeout down.

Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: bf5xx-ad73311: Fix prototype for bf5xx_probe
Axel Lin [Thu, 15 Sep 2011 03:04:56 +0000 (11:04 +0800)]
ASoC: bf5xx-ad73311: Fix prototype for bf5xx_probe

Fix below build warning:
sound/soc/blackfin/bf5xx-ad73311.c: warning: initialization from incompatible pointer type

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: samsung: Fix checking return value of clk_get
Axel Lin [Thu, 15 Sep 2011 02:36:54 +0000 (10:36 +0800)]
ASoC: samsung: Fix checking return value of clk_get

clk_get() returns a pointer to the struct clk or an ERR_PTR().
This patch also use PTR_ERR() for return value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: improve asynchronous mode support in the fsl_ssi driver
Timur Tabi [Tue, 13 Sep 2011 17:59:37 +0000 (12:59 -0500)]
ASoC: improve asynchronous mode support in the fsl_ssi driver

The Freescale SSI audio controller supports "synchronous" and "asynchronous"
modes.  In synchronous mode, playback and capture use the same input clock,
so sample rates must be the same during simultaneous playback and capture.
Unfortunately, the code which supports asynchronous mode is just broken in
various ways.  In particular, it was constraining sample sizes as well as
the sample rate.

The fix also allows us to simplify the code by eliminating the 'asynchronous',
'playback', and 'capture' variables that were used to keep track of playback
and capture streams.

Unfortunately, it turns out that simulataneous playback and record does not
actually work on the only platform that supports asynchronous mode: the
Freescale P1022DS reference board.  If a second stream is started, the SSI
grinds to halt for both streams.  This is true even if the P1022 is configured
for synchronous mode, so it's likely a hardware problem that needs to be
worked around.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'fix/misc' into for-next
Takashi Iwai [Thu, 15 Sep 2011 07:04:57 +0000 (09:04 +0200)]
Merge branch 'fix/misc' into for-next

13 years agoALSA: pcm - fix race condition in wait_for_avail()
Arjan van de Ven [Thu, 15 Sep 2011 06:49:25 +0000 (08:49 +0200)]
ALSA: pcm - fix race condition in wait_for_avail()

wait_for_avail() in pcm_lib.c has a race in it (observed in practice by an
Intel validation group).

The function is supposed to return once space in the buffer has become
available, or if some timeout happens.  The entity that creates space (irq
handler of sound driver and some such) will do a wake up on a waitqueue
that this function registers for.

However there are two races in the existing code

1) If space became available between the caller noticing there was no
   space and this function actually sleeping, the wakeup is missed and the
   timeout condition will happen instead

2) If a wakeup happened but not sufficient space became available, the
   code will loop again and wait for more space.  However, if the second
   wake comes in prior to hitting the schedule_timeout_interruptible(), it
   will be missed, and potentially you'll wait out until the timeout
   happens.

The fix consists of using more careful setting of the current state (so
that if a wakeup happens in the main loop window, the schedule_timeout()
falls through) and by checking for available space prior to going into the
schedule_timeout() loop, but after being on the waitqueue and having the
state set to interruptible.

[tiwai: the following changes have been added to Arjan's original patch:
 - merged akpm's fix for waitqueue adding order into a single patch
 - reduction of duplicated code of avail check
]

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Wed, 14 Sep 2011 17:11:13 +0000 (19:11 +0200)]
Merge branch 'fix/asoc' into for-linus

13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Wed, 14 Sep 2011 15:08:30 +0000 (17:08 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Wed, 14 Sep 2011 15:08:24 +0000 (17:08 +0200)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: snd-usb: move code from urb.c to endpoint.c
Daniel Mack [Wed, 14 Sep 2011 10:46:57 +0000 (12:46 +0200)]
ALSA: snd-usb: move code from urb.c to endpoint.c

No code altered at this point, simply preparing for upcoming
refactorizations.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: snd-usb: re-order code
Daniel Mack [Mon, 12 Sep 2011 16:54:12 +0000 (18:54 +0200)]
ALSA: snd-usb: re-order code

Move code from endpoint.c into a new file called stream.c and rename
functions so that their names actually reflect what they're doing.

This way, endpoint.c will be available to functions that hold all the
endpoint logic.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: snd-usb: re-order the Makefile
Daniel Mack [Mon, 12 Sep 2011 16:54:11 +0000 (18:54 +0200)]
ALSA: snd-usb: re-order the Makefile

Sort its entries in alphabetical order.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoUSB: Add endpoint usage definitions to ch9.h
Daniel Mack [Mon, 12 Sep 2011 16:54:10 +0000 (18:54 +0200)]
USB: Add endpoint usage definitions to ch9.h

The endpoint usage field is described in the USB 2.0 specification,
chapter 9.6.6.

Also, move the sync type fields block down by some lines to reflect the
fact that these are also stuffed in bmAttributes.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: HDA: Cirrus - fix "Surround Speaker" volume control name
David Henningsson [Wed, 14 Sep 2011 11:22:54 +0000 (13:22 +0200)]
ALSA: HDA: Cirrus - fix "Surround Speaker" volume control name

This patch fixes "Surround Speaker Playback Volume" being cut off.
(Commit b4dabfc452a10 was probably meant to fix this, but it fixed
only the "Switch" name, not the "Volume" name.)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: Correct channel numbers for WM8996 AIF2
Mark Brown [Sun, 11 Sep 2011 05:36:17 +0000 (22:36 -0700)]
ASoC: Correct channel numbers for WM8996 AIF2

The AIF1 channels are numbered from zero than one; do the same thing for
AIF2 too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Disable WM8996 CPVDD supply when not in use
Mark Brown [Sun, 11 Sep 2011 09:05:18 +0000 (10:05 +0100)]
ASoC: Disable WM8996 CPVDD supply when not in use

The WM8996 only requires CPVDD when the charge pump is active so control
it separately to the other supplies, only enabling it when the charge pump
is active. This will result in a small power saving on systems which are
able to provide independent software control of the supply.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoregulator: Implement deferred disable support
Mark Brown [Sun, 11 Sep 2011 08:53:50 +0000 (09:53 +0100)]
regulator: Implement deferred disable support

It is a reasonably common pattern for hardware to require some delay after
being quiesced before the disable has finalised, especially in mixed signal
devices. For example, an active discharge may be required to ensure that
the circuit starts up again in a known state. Avoid having to implement
such delays in the regulator API by providing regulator_deferred_disable()
which will do a regulator_disable() a specified number of milliseconds
after it is called.

Due to the reference counting done on regulators a deferred disable can
be cancelled by doing another regulator_enable().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Wed, 14 Sep 2011 09:01:09 +0000 (11:01 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: mpu401: clean up interrupt specification
Clemens Ladisch [Tue, 13 Sep 2011 09:24:41 +0000 (11:24 +0200)]
ALSA: mpu401: clean up interrupt specification

The semantics of snd_mpu401_uart_new()'s interrupt parameters are
somewhat counterintuitive:  To prevent the function from allocating its
own interrupt, either the irq number must be invalid, or the irq_flags
parameter must be zero.  At the same time, the irq parameter being
invalid specifies that the mpu401 code has to work without an interrupt
allocated by the caller.  This implies that, if there is an interrupt
and it is allocated by the caller, the irq parameter must be set to
a valid-looking number which then isn't actually used.

With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value,
which forces us to handle the parameters differently.

This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the
device interrupt is handled by the caller, and makes the allocation of
the interrupt to depend only on the irq parameter.  As suggested by
Takashi, the irq_flags parameter was dropped because, when used, it had
the constant value IRQF_DISABLED.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'fix/hda' into for-next
Takashi Iwai [Wed, 14 Sep 2011 07:22:09 +0000 (09:22 +0200)]
Merge branch 'fix/hda' into for-next

13 years agoALSA: hda - Terminate the recursive connection search properly
Takashi Iwai [Tue, 13 Sep 2011 08:33:16 +0000 (10:33 +0200)]
ALSA: hda - Terminate the recursive connection search properly

The recursive search of widget connections in snd_hda_get_conn_index()
must be terminated at the pin and the audio-out widgets.  Otherwise
you'll get "too deep connection" warnings unnecessarily.

Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'fix/asoc' into for-next
Takashi Iwai [Tue, 13 Sep 2011 08:20:13 +0000 (10:20 +0200)]
Merge branch 'fix/asoc' into for-next

13 years agoASoC: Fix trivial build regression in Kirkwood I2S
Arnd Bergmann [Sun, 11 Sep 2011 18:07:30 +0000 (20:07 +0200)]
ASoC: Fix trivial build regression in Kirkwood I2S

A fix merged in 3.1-rc2 introduced a small regression, this should get it
to build again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Mon, 12 Sep 2011 08:37:17 +0000 (10:37 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoMerge branch 'topic/hda' into for-next
Takashi Iwai [Mon, 12 Sep 2011 08:37:14 +0000 (10:37 +0200)]
Merge branch 'topic/hda' into for-next

13 years agoALSA: keywest: Remove obsolete cleanup for clientdata
Axel Lin [Fri, 9 Sep 2011 09:50:52 +0000 (17:50 +0800)]
ALSA: keywest: Remove obsolete cleanup for clientdata

The i2c core will clear the clientdata pointer automatically.
We don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: aoa: Remove obsolete cleanup for clientdata
Axel Lin [Fri, 9 Sep 2011 11:04:45 +0000 (19:04 +0800)]
ALSA: aoa: Remove obsolete cleanup for clientdata

The i2c core will clear the clientdata pointer automatically.
We don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.

Also remove a unneeded NULL checking for kfree.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Add Headphone Playback Volume control for ad1988/ad1989
Raymond Yau [Wed, 31 Aug 2011 02:30:59 +0000 (10:30 +0800)]
ALSA: hda - Add Headphone Playback Volume control for ad1988/ad1989

- use DAC0 instead of DAC1 for Port-A Headphone
- assign 0x03 to spec->multiout.hp_nid except model="6stack-dig-fp"

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/asoc' into for-next
Takashi Iwai [Mon, 12 Sep 2011 08:32:16 +0000 (10:32 +0200)]
Merge branch 'topic/asoc' into for-next

13 years agoMerge branch 'topic/misc' into for-next
Takashi Iwai [Mon, 12 Sep 2011 08:30:52 +0000 (10:30 +0200)]
Merge branch 'topic/misc' into for-next

13 years agoALSA: ymfpci: add "Playback" to FM Legacy Volume control
Raymond Yau [Fri, 9 Sep 2011 11:15:01 +0000 (19:15 +0800)]
ALSA: ymfpci: add "Playback" to FM Legacy Volume control

YDSXGR_LEGACYOUTVOL is a Playback Volume control for OPL3 FM Synth.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: usb: refine delay information with USB frame counter
Pierre-Louis Bossart [Wed, 7 Sep 2011 00:15:34 +0000 (19:15 -0500)]
ALSA: usb: refine delay information with USB frame counter

Existing code only updates the audio delay when URBs were
submitted/retired. This can introduce an uncertainty of 8ms
on the number of samples played out with the default settings,
and a lot more when URBs convey more packets to reduce the
interrupt rate and power consumption.

This patch relies on the USB frame counter to reduce the
uncertainty to less than 2ms worst-case. The delay information
essentially becomes independent of the URB size and number of
packets. This should help applications like PulseAudio which
require accurate audio timing. Clemens Ladisch reported
a decrease of mplayer's A-V difference from nrpacks down to at
most 1ms.

Thanks to Clemens for also pointing out that the implementation
of frame counters varies between different HCDs. Only the
8 lowest-bits are used to estimate the delay.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[clemens: changed debug code]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: ad193x: Setup regmap read and write flag masks for SPI
Lars-Peter Clausen [Mon, 5 Sep 2011 18:46:33 +0000 (20:46 +0200)]
ASoC: ad193x: Setup regmap read and write flag masks for SPI

Currently register read-back for the ad193x is broken, because it expects bit 0
of the upper byte to be set to indicate a read operation, while the regmap
default for SPI is to use bit 7.

This patch also addresses another oddity of the device. There are SPI and I2C
versions of this codec. In both cases the registers are 8-bit wide and numbered
from 0x0 to 0x10, but in the SPI case there is also a so called
'global address' which is prefixed in-front of the register address. The global
address mimics I2C behaviour and includes a static device address the and the
read/write flag. This basically extends the register address to an 16-bit value
numbered from 0x800 to 0x810. These are the register numbers which are
currently used by the driver. This works, because I2C will ignore the upper
8 bits of the register, but it is still a bit confusing, as there are no such
register numbers in the I2C case.

The approach taken by this patch is to number the registers from 0x00 to 0x10
and encode the global address for SPI mode into the read and write flag masks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'topic/interface' of git://opensource.wolfsonmicro.com/regmap into for-3.2
Mark Brown [Fri, 9 Sep 2011 18:11:24 +0000 (11:11 -0700)]
Merge branch 'topic/interface' of git://opensource.wolfsonmicro.com/regmap into for-3.2

13 years agoregmap: Provide device read and write map interface for merging
Mark Brown [Mon, 5 Sep 2011 18:46:32 +0000 (20:46 +0200)]
regmap: Provide device read and write map interface for merging

Add the externally visible interface introduced by Lars-Peter's commit
6f3064 (regmap: Add support for device specific write and read flag
masks) separately in order to allow merge into other subsystems for
integration with drivers.  Drivers relying on this feature will not be
functional until they are merged with the implementation.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: playpaq_wm8510: Return proper error if clk_get fails
Axel Lin [Fri, 9 Sep 2011 02:15:37 +0000 (10:15 +0800)]
ASoC: playpaq_wm8510: Return proper error if clk_get fails

Return proper error instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sst_platform: fix memory leak
Lu Guanqun [Tue, 6 Sep 2011 07:21:43 +0000 (15:21 +0800)]
ASoC: sst_platform: fix memory leak

snd_pcm_hw_constraint_integer() could return -1, in this case, sst platform is
not opened successfully.  However the corresponding close callback isn't able
to be called later on to release these two allocated memories, thus resulting
in memory leak.

This patch moves the check for hardware contraints earlier, thus resolving this
issue.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sst_platform: using builtin function
Lu Guanqun [Tue, 6 Sep 2011 07:21:38 +0000 (15:21 +0800)]
ASoC: sst_platform: using builtin function

Use the builtin snd_soc_set_runtime_hwparams() instead of assigning it by
myself.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>