Commit graph

19754 commits

Author SHA1 Message Date
Jianqun 3b40a80216 ASoC: rockchip-i2s: add dma data to snd_soc_dai
Add playback/capture dma data to snd_soc_dai.
Test on RK3288 with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:38:16 -07:00
Jianqun 38306afc10 ASoC: rockchip-i2s: fix rockchip i2s defination more reasonable
Fix SND_ROCKCHIP_I2S to be more reasonable - SND_SOC_ROCKCHIP_I2S,
SND_SOC_ROCKCHIP_I2S should select by audio driver, instead of
SND_SOC_ROCKCHIP.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:38:16 -07:00
Jianqun 01605ad128 ASoC: rockchip-i2s: enable "hclk" for rockchip I2S controller
As "hclk" is used for rockchip I2S controller, driver must to enable
it in probe.

Tested on RK3288 with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:36:54 -07:00
Jianqun 2f1e93f81c ASoC: rockchip-i2s: fix registers' property of rockchip i2s controller
Reference rockchip I2S controller TRM, modify some registers' property
I2S_FIFOLR: read / write, but not volatile, not precious
I2S_INTSR: read / write
I2S_CLR: volatile, register value will be cleared by read

Test on RK3288 with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:35:43 -07:00
Jianqun 07833d8831 ASoC: rockchip-i2s: fix master mode set bit error
Fix error format set to I2S master or slave mode.
Test on RK3288 board with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:34:16 -07:00
Kuninori Morimoto 9810f5370b ASoC: simple-card: tidyup get dai_link/dai_props from priv
It can get dai_link/dai_props pointer from priv + index

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-12 15:00:58 +01:00
Kuninori Morimoto f531913f01 ASoC: simple-card: tidyup use priv in parameter
priv has many information about simple-card driver.
Using it becomes easy to extend feature.
This patch gets dev from priv as 1st step

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-12 14:59:48 +01:00
Paul Handrigan 774418253e ASoC: cs4265: Fix register address to set the proper data type.
The SPDIF control register must be written to set the data type in hw_params
not the ADC control register.

Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-11 17:17:31 +01:00
Takashi Iwai 81965f1f58 ALSA: hda - Make snd_hda_jack_tbl_new() static
It's called only in hda_jack.c, so make it local.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-11 14:22:03 +02:00
Takashi Iwai 62f949bf6b ALSA: hda - Get rid of action field from struct hda_jack_tbl
The action value assigned to each hda_jack_tbl entry is mostly
superfluous.  The actually used values are either the widget NID or a
value specific to the callback.

The former case can be simply replaced by a reference to widget NID
itself.  The only place doing the latter is STAC/IDT codec driver for
the powermap handling.  But, the code doesn't need to check the action
field at all -- the function jack_update_power() is called either with
a specific pin or with NULL.  So the check of jack->action can be
removed completely there, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-11 14:14:21 +02:00
Takashi Iwai 998052b745 Merge branch 'for-linus' into for-next
Merging for-linus branch for syncing the latest STAC/IDT codec
changes to be affected by the upcoming hda-jack rewrites.
2014-09-11 13:43:49 +02:00
Takashi Iwai 7a9744cb45 ALSA: hda - Fix invalid pin powermap without jack detection
When a driver is set up without the jack detection explicitly (either
by passing a model option or via a specific fixup), the pin powermap
of IDT/STAC codecs is set up wrongly, resulting in the silence
output.  It's because of a logic failure in stac_init_power_map().
It tries to avoid creating a callback for the pins that have other
auto-hp and auto-mic callbacks, but the check is done in a wrong way
at a wrong time.  The stac_init_power_map() should be called after
creating other jack detection ctls, and the jack callback should be
created only for jack-detectable widgets.

This patch fixes the check in stac_init_power_map() and its callee
at the right place, after snd_hda_gen_build_controls().

Reported-by: Adam Richter <adam_richter2004@yahoo.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-11 13:05:32 +02:00
Andy Shevchenko 3d598f47e8 dmaengine: dw: move dw_dmac.h to where it belongs to
There is a common storage for platform data related structures and definitions
inside kernel source tree. The patch moves file from include/linux to
include/linux/platform_data and renames it acoordingly. The users are also
updated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[For the arch/avr32/.* and .*sound/atmel.*]
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11 11:48:12 +05:30
Qiao Zhou a22e292260 ASoC: mmp-pcm: add NO_PERIOD_WAKEUP for PCM INFO
add NO_PERIOD_WAKEUP to PCM INFO, which supports audio no IRQ mode

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11 10:47:44 +05:30
Mark Brown 5e3905f62b Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/max98090', 'asoc/fix/samsung' and 'asoc/fix/tlv320aic31xx' into asoc-linus 2014-09-10 12:21:03 +01:00
Mark Brown 2eb1dc3179 Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linus 2014-09-10 12:21:02 +01:00
Mark Brown e87a925fb9 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-09-10 12:21:01 +01:00
Arnd Bergmann 88a60e552f ASoC: simple-card: fix regression in clock rate lookup
Commit 7c7b9cf53d ("ASoC: simple-card: fixup cpu_dai_name
clear case") changed the way that "sound-dai" properties are handled,
which leads to the clock frequency not being picked up from the
node that the phandle points to, as correctly identified by gcc
with this warning:

sound/soc/generic/simple-card.c: In function 'asoc_simple_card_sub_parse_of':
sound/soc/generic/simple-card.c:165:7: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized]

This restores the previous behavior by using the node from
of_parse_phandle_with_args() that was previously being
returned from of_parse_phandle().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-10 11:56:42 +01:00
Xiubo Li 0dd4fc3c2f ASoC: simple-card: Adjust the comments of simple card.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-10 11:52:37 +01:00
Qiao Zhou 8f70e515a8 ASoC: soc-pcm: fix dpcm_path_get error handling
dpcm_path_get may return -ENOMEM when allocating memory for list
fails. We should not keep processing path or start up dpcm dai in
this case.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-10 11:40:21 +01:00
Lars-Peter Clausen f0b99ca041 ASoC: da732x: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:47 +01:00
Lars-Peter Clausen ee6b42ee21 ASoC: da732x: Remove unused codec field form da732x_priv struct
The field is initialized in the probe callback, but never used again. So it
can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:46 +01:00
Lars-Peter Clausen f66a91ff8e ASoC: da732x: Remove unnecessary idle_bias_off initialization
idle_bias_off is false by default, no need to set it explicitly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:45 +01:00
Lars-Peter Clausen 02bf34f4b8 ASoC: cs42l73: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:41 +01:00
Lars-Peter Clausen 2a4bc751fc ASoC: cs42l56: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:38 +01:00
Lars-Peter Clausen 417c60e8f2 ASoC: cs42l52: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:22 +01:00
Mark Brown de3ac81068 Merge branch 'topic/cs42l56' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-suspend 2014-09-09 21:08:02 +01:00
Charles Keepax 133c2681c4 ASoC: samsung-i2s: Check secondary DAI exists before referencing
In a couple of places the driver is missing a check to ensure there is a
secondary DAI before it de-references the pointer to it, causing a null
pointer de-reference. This patch adds a check to avoid this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-09-09 20:59:06 +01:00
Xiubo Li 2080437d37 ASoC: simple-card: Merge single and muti DAI link(s) code.
This patch will split the DT node into old style and new style:
The new style will merge the single DAI link and muti DAI links code
together, the new style will be easier to add muti DAI links from old
single DAI link DTs.

This patch will maintian compatibility with the old DTs.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 12:59:49 +01:00
Rajeev Kumar b794dbcd31 ASoC: Update email id of the author
I moved from ST Microelectronics and so updating email-id to personal one.

Signed-off-by: Rajeev Kumar <rajeevkumar.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 10:49:41 +01:00
Sudip Mukherjee e7e69265b6 sound: pci: au88x0: printk replacement
as pr_* macros are more preffered over printk, so printk replaced
with corresponding pr_* macros.
this patch will generate warning from checkpatch as it only did printk
replacement and didnot fixed other style issues.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-09 08:58:58 +02:00
Jurgen Kramer 848f3a82df ALSA: usb-audio: add native DSD support for XMOS based DACs
Add quirks for XMOS based DACs for native DSD playback support using the new
DSD_U32_LE sample format.

This version adds native DSD support for:
- iFi Audio micro iDSD/nano iDSD (they use the same prod. id)
- DIYINHK USB to I2S/DSD converter

Changes from v2:
- fix and simplify switch statement
Changes from v1:
- use specific product id and alt setting per XMOS based device

[fixed a misc coding style issue by tiwai]

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08 17:11:39 +02:00
Jurgen Kramer d4288d3fac ALSA: pcm: add new DSD sampleformat for native DSD playback on XMOS based devices
XMOS based USB DACs with native DSD support expose this feature via a USB
alternate setting. The audio format is either 32-bit raw or a 32-bit PCM format.
To utilize this feature on linux this patch introduces a new 32-bit DSD
sampleformat DSD_U32_LE.
A follow up patch will add a quirk for XMOS based devices to utilize the new format.
Further patches will add support to alsa-lib.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08 17:11:00 +02:00
Takashi Iwai 7fd4394dfe Merge branch 'topic/pcm-nonatomic' into for-next
This is a merge for exending PCM ops to be non-atomic.
2014-09-08 11:01:44 +02:00
Clemens Ladisch d6cc58e127 ALSA: virtuoso: add Xonar Essence STX II daughterboard support
Detect and handle the H6 daughterboard; it works the same as with the
ST, except that there is no conflict with the CS2000 chip.

Tested-by: Andreas Allacher <andreas.allacher@gmx.at>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08 10:57:45 +02:00
Clemens Ladisch dd38dc1a9b ALSA: virtuoso: add one more headphone impedance setting
Add one more option to the "Headphones Impedance" control to synchronize
with recent versions of the Windows driver.

Tested-by: fugazzi® <fugazzi99@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08 10:57:14 +02:00
Clemens Ladisch 49f4b4d15c ALSA: usb-audio: add MIDI port names for the Yamaha MOTIF XF
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08 10:54:39 +02:00
Clemens Ladisch df1e471966 ALSA: pcm: snd_interval_step: fix changes of open intervals
Changing an interval boundary to a multiple of the step size makes that
boundary exact.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08 10:54:25 +02:00
Clemens Ladisch 0f519b6221 ALSA: pcm: snd_interval_step: drop the min parameter
The min parameter was not used by any caller.  And if it were used,
underflows in the calculations could lead to incorrect results.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-08 10:54:18 +02:00
Subhransu S. Prusty 02024756e6 ASoC: mfld: pcm: Replace pr_ with dev_
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06 15:21:25 +01:00
Lars-Peter Clausen 0634814fe0 ASoC: Remove table based DAPM/control setup support from snd_soc_platform_driver
There are no users left and new users should rather use the component_driver
struct embedded in the snd_soc_platform_driver struct to do this. E.g.:

static const struct snd_soc_platform_driver foobar_driver = {
	.component_driver = {
		.dapm_widgets = ...,
		.num_dapm_widgets = ...,
		...,
	},
	...
};

instead of

static const struct snd_soc_platform_driver foobar_driver = {
	.dapm_widgets = ...,
	.num_dapm_widgets = ...,
	...
};

This also allows us to remove the steal_sibling_dai_widgets hack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06 14:46:30 +01:00
Lars-Peter Clausen 923976a30b ASoC: sst-haswell-pcm: Move controls and DAPM elements to component
The sst-haswell-pcm driver registers both a snd_soc_component and a
snd_soc_platform and expects that the DAPM widgets for the DAIs registered by
component are added to the DAPM context of the platform. This requires us to
have a hack in the ASoC core which does so. Moving the DAPM elements over to
the component allows us to remove this hack.

While we are at it also move the controls over to the component. The controls
don't need the platform for anything other than snd_soc_platform_get_drvdata(),
this can easily be replaced by snd_soc_component_get_drvdata(). As the long
term goal is to register only a single component this is a step in the right
direction.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06 14:44:33 +01:00
Lars-Peter Clausen bd033808e2 ASoC: sst-haswell-pcm: Alloc state struct in driver probe()
Resource allocations should happen in driver probe callback rather than in
snd_soc_platform probe functions. Especially if the resource is device
managed. The snd_soc_* probe/remove functions are mainly intended to be used
for things that require the component to be already bound to a card.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06 14:44:33 +01:00
Mark Brown 1ee0beb985 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2014-09-06 14:44:11 +01:00
Lars-Peter Clausen 8d01370f59 ASoC: es8328: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:30 +01:00
Mark Brown bade5f09ca Merge branch 'topic/suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-es8328 2014-09-06 13:38:26 +01:00
Lars-Peter Clausen e649057a41 ASoC: sgtl5000: Cleanup bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:07 +01:00
Lars-Peter Clausen 35199a7c11 ASoC: ml26124: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:07 +01:00
Lars-Peter Clausen 2a93f70925 ASoC: jz4740: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:07 +01:00
Lars-Peter Clausen 3d2c42d191 ASoC: 88pm860x-codec: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:01 +01:00
Rajeev Kumar 9a302c32f3 ASoC: dwc: Update email id of the author
I moved from ST Microelectronics and the email-id no longer
exists. Update email-id to personal one,

Signed-off-by: Rajeev Kumar <rajeevkumar.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 12:47:22 +01:00
Lars-Peter Clausen 85362efb80 ASoC: ssm2602: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. While we are at it also remove the
regcache_cache_only() calls from suspend/resume as there shouldn't be any IO
between suspend and resume.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:26 +01:00
Lars-Peter Clausen 0f0cc5a775 ASoC: ssm2518: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_OFF at the end of CODEC probe()
can also be removed as the CODEC is already in OFF state at this point.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen cd5d3a1511 ASoC: adav80x: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. While we are at it also remove the
regcache_cache_only() calls from suspend/resume as there shouldn't be any IO
between suspend and resume.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen 0e0f9b960a ASoC: adau17x1: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen d7858bd647 ASoC: adau1373: Cleanup manual bias level transitions
The ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF
when removing the CODEC, no need to do it manually anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen a80932979a ASoC: Always run default suspend/resume code
We do a bit more than just running the callbacks during suspend and resume
these days (e.g. call regcache_mark_dirty() during suspend). But this is
only when suspend and resume callbacks are specified for the driver,
otherwise nothing is done. This means that drivers which don't want to do
anything special during suspend and resume, but still want the standard
operations to run, need to provide empty suspend and resume callback
functions (rather than no callbacks). This patch updates the suspend and
resume code to always run standard sequence regardless of whether suspend
and resume handlers are provided.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen 86dbf2ac6f ASoC: Add support for automatically going to BIAS_OFF on suspend
There is a substantial amount of drivers that in go to SND_SOC_BIAS_OFF on
suspend and go back to SND_SOC_BIAS_SUSPEND on resume (Often this is even
the only thing done in the suspend and resume handlers). This patch
introduces a new suspend_bias_off flag, which when set by a driver will let
the ASoC core automatically put the device's DAPM context at the
SND_SOC_BIAS_OFF level during suspend. Once the device is resumed the DAPM
context will go back to SND_SOC_BIAS_STANDBY (if the context is idle,
otherwise to SND_SOC_BIAS_ON).

This will allow us to remove a fair bit of duplicated code from the drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen 1c325f771a ASoC: Shutdown DAPM contexts when removing a card
Currently when a ASoC sound card is unregistered we leave the individual
components in their current state, just call the remove() callback and leave
it to the drivers to do the proper shutdown/cleanup.

This patch introduces a call to snd_soc_dapm_shutdown() when removing the
card.  This will make sure that all DAPM widgets are properly powered down
and all DAPM contexts are put at the SND_SOC_BIAS_OFF level. This will
ensure that all components are properly powered down when the card is
removed.

Since a lot of drivers manually go to SND_SOC_BIAS_OFF in their remove
callback this will also allow us to remove a bit of duplicated code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen 01e0df6647 ASoC: Set card->instantiated to false when removing the card
Set card->instantiated to false when the card is removed to make sure that
operations that expect the card to be fully instantiated do not run anymore
during card removal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Mark Brown 769b475323 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-suspend 2014-09-04 20:10:21 +01:00
Peter Ujfalusi fe0a29e163 ASoC: davinci-mcasp: Correct rx format unit configuration
In case of capture we should not use rotation. The reverse and mask is
enough to get the data align correctly from the bus to MCU:
Format	  data from bus    after reverse (XRBUF)
S16_LE:  |LSB|MSB|xxx|xxx|  |xxx|xxx|MSB|LSB|
S24_3LE: |LSB|DAT|MSB|xxx|  |xxx|MSB|DAT|LSB|
S24_LE:  |LSB|DAT|MSB|xxx|  |xxx|MSB|DAT|LSB|
S32_LE:  |LSB|DAT|DAT|MSB|  |MSB|DAT|DAT|LSB|

With this patch all supported formats will work for playback and capture.

Reported-by: Jyri Sarha <jsarha@ti.com> (broken S24_3LE capture)
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-04 12:44:49 +01:00
Peter Ujfalusi 9cfb76905d ASoC: tlv320aic31xx: Enable support for S24_LE format
S24_LE is the same on the bus as S24_3LE, which means the codec can support
it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 12:05:31 +01:00
Lars-Peter Clausen e02c716d2e ASoC: wm8995: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen a7edeba4cb ASoC: wm8804: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen 7d1a99da08 ASoC: tlv320aic3x: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen 8e6fe35eab ASoC: lm49453: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen b43cfb245f ASoC: adau1373: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Also drop the regcache_cache_only() calls from the suspend and resume
handlers. There shouldn't be any IO happening after suspend and before
resume.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:25 +01:00
Takashi Iwai 05244d1667 ASoC: Fixes for v3.17
A few more driver specific fixes on top of the currently pending fixes
 (which are already in your tree but not Linus').
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUByMFAAoJELSic+t+oim9YfkP/27rmG+gA43D8EuPc+QvAY+b
 fXyT6CgsacFEh867ubyVkxPHp7rtDvRFXrckPOpMEQiTUTbFkhVST6xXYlP4LZzA
 97AiJqzSkPJiAlTxWTwlf8EkRw4n82uYSqOUx8ZlJbtUqt8VeaTVshm+L5emBPq1
 Q9BvcJ233Co7OWtHr2DsDh1sn7oYBBkO+mX9Ewcn79shhNdcH52IrWfih/6MHKmJ
 UtgThDokbvTXZlX7bxsfmEHloP9TJL5Et1pYDlQmQ1CqcJYG0YrQ8PylMeFE4SV9
 Ej68ogbJqddZNWS/6wyDXBKxsl54l+OJaHPGizxruvIBlpowkpyMS1pj5Us10VCc
 mqUuqGfXQbm2B7DJr9/P9+jI5QVcBJ0z8RZ+0dCgFZKU0+A1zTue75RKH7tO/M0C
 KEPW/G3MevbXJNCU1QUVkjZnsyw22302irSxksmmuE/grUabILDqWTFzXIX/v0mk
 1fE1dOGLpztHWLdnZ5eXd2xLRF48EoZbeIj8n6rXJOA4zMbZFbkAwt8BbljU2DCN
 Pb/54HP/0+s+Ig6r4vU5J/IPGKBGUj8z2F4wbZzSbT37X05JF2BP8E6FIRPkYLbp
 hUtLXTP0mNXE0L99CzkPnVJZa4cViHUNZ7Zde7jza3s0F8T49IDS8g3codFAqFtK
 n2wJa9hB2fMKw7pgVfzv
 =gYI8
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.17

A few more driver specific fixes on top of the currently pending fixes
(which are already in your tree but not Linus').
2014-09-03 16:57:41 +02:00
Takashi Iwai d89c6c0c91 ALSA: hda - Add TLV_DB_SCALE_MUTE bit for relevant controls
The DACs on Sigmatel/IDT codecs do mute at the lowest volume level,
and in the earlier drivers, we passed TLV_DB_SCALE_MUTE bit for each
volume control element like Speaker and Headphone as well as Master.
Along with the translation to the generic parser, however, the TLV bit
was lost for the slave controls (e.g. Speaker) but set only to
Master.  In theory this should have sufficed, but apps, particularly
PA, do care the slave volume bits, so we seem to see a regression in
the volume controls.

This patch adds a flag to hda_gen_spec to specify the DAC mute
feature, and adds the TLV bit properly for all relevant volume
controls.  Also, the TLV bit for vmaster is set in hda_generic.c, so
that we can get rid of all tricks from the codec driver side.

As the similar hack is applied to Conexant 5051 stuff, we can get rid
of it as well.

BugLink: https://bugs.launchpad.net/bugs/1357928
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 16:39:29 +02:00
Jarkko Nikula b8a3ee820f ASoC: max98090: Add recovery for PLL lock failure
All MAX98090 input clocks MCLK, LRCLK and BCLK must be running and stable
before powering on the codec in slave mode. Otherwise the PLL may not lock
to LRCLK causing silence in playback and capture. How often that happens is
somewhat hardware and clock configuration specific.

Now if wanting to follow strictly this clocks must be active before
powering the codec on requirement we should have a notification from DAI
driver to codec driver when clocks are activated and take codec out of
shutdown only after that. Plus take care of possible active bypass paths.

However, when PLL unlock occurs, MAX98090 asserts the PLL Unlock Flag which
can be configured as an IRQ source. This allows to workaround around the
issue by toggling the codec power shortly in case of PLL lock failure.

In order to prevent needlessly toggling codec power in case of short PLL
unlocks at the beginning of stream this patch implements delayed activation
for PLL unlock interrupt. Then workaround is run only when the PLL doesn't
lock at all.

Power toggling workaround for PLL unlock comes originally from
Liam Girdwood <liam.r.girdwood@linux.intel.com> and delayed activation from
me.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 15:27:07 +01:00
Jyri Sarha 7ed36e96fd ASoC: tlv320aic31xx: Choose PLL p divider automatically
This simplifies aic31xx_divs table. There is no more need for p_val or
separate lines for 12 and 24 MHz mclks.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 15:25:44 +01:00
Mark Brown 94fe356f4c Merge branch 'fix/tlv320aic31xx' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-tlv320aic31xx 2014-09-03 15:25:17 +01:00
Jyri Sarha 03be88ee4a ASoC: tlv320aic31xx: Fix 24bit samples with I2S format and 12MHz mclk
I2S format requires bitclock to have an exact amount of cycles in a
frame for audio to work cleanly. With dsp formats that is not so
important.

Updates aic31xx_setup_pll() to look for a line in aic31xx_divs table
that produces the best match for the bitclock and adds lines to
aic31xx_divs for 12MHz mclk and 24bit samples.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 15:23:56 +01:00
Kuninori Morimoto 7c7b9cf53d ASoC: simple-card: fixup cpu_dai_name clear case
f687d900d3
(ASoC: simple-card: cpu_dai_name creates confusion when DT case)
cleared cpu_dai_name for caring fmt_single_name case,
and
179949bc04
(ASoC: simple-card: remove dai_link->cpu_dai_name when DT)
cared multi dai-link case.
but, cpu_dai_name matching is required when fmt_multiple_name was used

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 13:53:44 +01:00
Takashi Iwai 7af142f752 ALSA: pcm: Uninline snd_pcm_stream_lock() and _unlock()
The previous commit for the non-atomic PCM ops added more codes to
snd_pcm_stream_lock() and its variants.  Since they are inlined
functions, it resulted in a significant code size bloat.  For reducing
the size bloat, this patch changes the inline functions to the normal
function calls.  The export of rwlock and rwsem are removed as well,
since they are referred only in pcm_native.c now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 14:04:18 +02:00
Takashi Iwai 257f8cce5d ALSA: pcm: Allow nonatomic trigger operations
Currently, many PCM operations are performed in a critical section
protected by spinlock, typically the trigger and pointer callbacks are
assumed to be atomic.  This is basically because some trigger action
(e.g. PCM stop after drain or xrun) is done in the interrupt handler.
If a driver runs in a threaded irq, however, this doesn't have to be
atomic.  And many devices want to handle trigger in a non-atomic
context due to lengthy communications.

This patch tries all PCM calls operational in non-atomic context.
What it does is very simple: replaces the substream spinlock with the
corresponding substream mutex when pcm->nonatomic flag is set.  The
driver that wants to use the non-atomic PCM ops just needs to set the
flag and keep the rest as is.  (Of course, it must not handle any PCM
ops in irq context.)

Note that the code doesn't check whether it's atomic-safe or not, but
trust in 100% that the driver sets pcm->nonatomic correctly.

One possible problem is the case where linked PCM substreams have
inconsistent nonatomic states.  For avoiding this, snd_pcm_link()
returns an error if one tries to link an inconsistent PCM substream.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 14:04:08 +02:00
David Henningsson aec856d0a8 ALSA: hda - Make the ALC269 pin quirk table shorter
...by factoring out common parts to the just added pin macros.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 11:36:29 +02:00
David Henningsson fea185e28e ALSA: hda - Add common pin macros for ALC269 family
This will be used in a later patch to make the pin quirk table shorter.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 11:36:00 +02:00
Hui Wang 0279661b64 ALSA: hda/realtek - move HP_GPIO_MIC1_LED quirk for alc280
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:35:59 +02:00
Hui Wang 200afc097c ALSA: hda/realtek - move HP_LINE1_MIC1_LED quirk for alc282
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:35:47 +02:00
Hui Wang e4442bcf1a ALSA: hda/realtek - move HP_MUTE_LED_MIC1 quirk for alc290
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:34:57 +02:00
Hui Wang 2c60999975 ALSA: hda/realtek - move HP_MUTE_LED_MIC1 quirk for alc282
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:34:44 +02:00
Hui Wang c77900e63a ALSA: hda/realtek - move DELL2_MIC_NO_PRESENCE quirk for alc255
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:34:21 +02:00
Hui Wang 29a4f69973 ALSA: hda/realtek - move DELL1_MIC_NO_PRESENCE quirk for alc255
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:33:22 +02:00
Hui Wang bc262179a9 ALSA: hda/realtek - move DELL1_MIC_NO_PRESENCE quirk for alc283
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:33:13 +02:00
Hui Wang e8818fa8c0 ALSA: hda/realtek - move DELL2_MIC_NO_PRESENCE quirk for alc292
Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 07:32:57 +02:00
Mark Brown f58f0cba15 Merge remote-tracking branches 'asoc/fix/axi', 'asoc/fix/cs4265', 'asoc/fix/da732x', 'asoc/fix/omap', 'asoc/fix/rsnd', 'asoc/fix/rt5640', 'asoc/fix/rt5677', 'asoc/fix/simple' and 'asoc/fix/tegra' into asoc-linus 2014-09-02 23:33:39 +01:00
Mark Brown e65f6b1eb5 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-09-02 23:33:38 +01:00
Takashi Iwai acf08081ad ALSA: hda - Fix COEF setups for ALC1150 codec
ALC1150 codec seems to need the COEF- and PLL-setups just like its
compatible ALC882 codec.  Some machines (e.g. SunMicro X10SAT) show
the problem like too low output volumes unless the COEF setup is
applied.

Reported-and-tested-by: Dana Goyette <danagoyette@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-02 07:21:56 +02:00
Lars-Peter Clausen ae70b190fc ASoC: ab8500-codec: Revert back to regmap
Commit ff795d614b ("ASoC: ab8500: Convert register I/O to regmap")
initially converted the ab8500 CODEC driver to use regmap rather than
legacy ASoC IO. This was reverted though in commit 63e6d43bf8 ("ASoC:
ab8500: Revert to using custom I/O functions") since the inital conversion
was not working properly. This was presumebly because the SOC_SINGLE_XR_SX
controls, which are used by this driver, did not properly support regmap at
that point. This has since been fixed in commit 6137a5ca32 ("ASoC: Prepare
SOC_SINGLE_XR_SX controls for regmap"). So revert back to regmap again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 17:59:23 +01:00
Xiubo Li e3c4a28b61 ASoC: simple-card: Fix bug of wrong decrement DT node's refcount
DAI links's cpu_of_node's and codec_of_node's refcounts shouldn't
be decremented immediately at the end of the probe() fucntion.
Because we will still use them before the audio card is removed.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 17:48:07 +01:00
Xiubo Li eadb0019d2 ASoC: fsl-sai: using 'lsb-first' property instead of 'big-endian-data'.
The 'big-endian-data' property is originally used to indicate whether the
LSB firstly or MSB firstly will be transmitted to the CODEC or received
from the CODEC, and there has nothing relation to the memory data.

Generally, if the audio data in big endian format, which will be using the
bytes reversion, Here this can only be used to bits reversion.

So using the 'lsb-first' instead of 'big-endian-data' can make the code
to be readable easier and more easy to understand what this property is
used to do.

This property used for configuring whether the LSB or the MSB is transmitted
first for the fifo data.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 16:36:42 +01:00
Mark Brown 025b78b809 Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-sai 2014-09-01 16:36:34 +01:00
Takashi Iwai ff50479ad6 ALSA: hda - Fix digital mic on Acer Aspire 3830TG
Acer Aspire 3830TG with CX20588 codec has a digital built-in mic that
has the same problem like many others, the inverted signal in stereo.
Apply the same fixup to this machine, too.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-01 14:26:49 +02:00
Wei Yongjun 75c3daaad5 ASoC: es8328: fix error return code in es8328_codec_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 11:34:00 +01:00
Peter Ujfalusi 085f3ec6fd ASoC: tlv320aic31xx: Correct interface register 2 variable name
Rename iface_reg3 to iface_reg2 since this variable is actually used for
interface register 2.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 10:53:37 +01:00
Mark Brown 5b87d31309 Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-esai 2014-09-01 10:49:32 +01:00
Kuninori Morimoto a44a750e52 ASoC: simple-card: use common for_each_child_of_node() for loop
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:51:02 +01:00
Kuninori Morimoto a5960bd598 ASoC: simple-card: dai_link->init should be cared when multi DAI
6a91a17bd7
(ASoC: simple-card: Handle many DAI links)
added multi DAI support on simple-card.
This means priv->dai_link might be pointer of multi DAI.
dai_link->init is needed for all DAI.
This patch cares it for all DAIs on DT/non-DT

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:51:02 +01:00
Kuninori Morimoto 179949bc04 ASoC: simple-card: remove dai_link->cpu_dai_name when DT
f687d900d3
(ASoC: simple-card: cpu_dai_name creates confusion when DT case)
removed dai_link->cpu_dai_name when DT case,
since it uses DT phand in soc_bind_dai_link().
This binding will fail if it has cpu_dai_name.

6a91a17bd7
(ASoC: simple-card: Handle many DAI links)
added multi DAI link support to simple-card driver.
Then, removing cpu_dai_name was cared only single DAI.
But, it is needed in all DT cases.
This patch moves it to asoc_simple_card_dai_link_of()
so that care about all DAIs.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:51:01 +01:00
Kuninori Morimoto 2d82eeb026 ASoC: simple-card: use asoc_simple_xxx prefix
simple-card driver is using asoc_simple_xxx() prefix.
simple_card_dai_link_of() should be
asoc_simple_card_dai_link_of().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:49:34 +01:00
Peter Ujfalusi fdaf42c010 ASoC: omap-twl4030: Fix typo in 2nd dai link's platform_name
The platform_name should be omap-mcasp3 for the 2nd link which is used for
voice connection.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie+linaro@kernel.org>
Cc: stable@vger.kernel.org
2014-08-29 11:55:23 +01:00
Takashi Sakamoto 65845f29be ALSA: firewire-lib/dice: add arrangements of PCM pointer and interrupts for Dice quirk
In IEC 61883-6, one data block transfers one event. In ALSA, the event equals one PCM frame,
hence one data block transfers one PCM frame. But Dice has a quirk at higher sampling rate
(176.4/192.0 kHz) that one data block transfers two PCM frames.

Commit 10550bea44 ("ALSA: dice/firewire-lib: Keep dualwire mode but obsolete
CIP_HI_DUALWIRE") moved some codes related to this quirk into Dice driver. But the commit
forgot to add arrangements for PCM period interrupts and DMA pointer updates. As a result, Dice
driver cannot work correctly at higher sampling rate.

This commit adds 'double_pcm_frames' parameter to amdtp structure for this quirk. When this
parameter is set, PCM period interrupts and DMA pointer updates occur at double speed than in
IEC 61883-6.

Reported-by: Daniel Robbins <drobbins@funtoo.org>
Fixes: 10550bea44 ("ALSA: dice/firewire-lib: Keep dualwire mode but obsolete CIP_HI_DUALWIRE")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org> # 3.16
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-29 09:52:07 +02:00
Takashi Sakamoto 1033eb5b5a ALSA: dice: fix wrong channel mappping at higher sampling rate
The channel mapping is initialized by amdtp_stream_set_parameters(), however
Dice driver set it before calling this function. Furthermore, the setting is
wrong because the index is the value of array, and vice versa.

This commit moves codes for channel mapping after the function and set it correctly.

Reported-by: Daniel Robbins <drobbins@funtoo.org>
Fixes: 10550bea44 ("ALSA: dice/firewire-lib: Keep dualwire mode but obsolete CIP_HI_DUALWIRE")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org> # 3.16
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-29 09:51:45 +02:00
Axel Lin 5f609f282b ASoC: cs35l32: Simplify implementation of cs35l32_codec_set_sysclk
Use single snd_soc_update_bits() call to update the register bits.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:14:18 +01:00
Axel Lin a4f87cea72 ASoC: cs42l56: Remove unneeded regulator_bulk_free call in cs42l56_remove
The regulator_bulk_free() call is not required because current code is using
devm_regulator_bulk_get().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:07:15 +01:00
Axel Lin 1a83269d5c ASoC: cs35l32: Remove unneeded regulator_bulk_free call in cs35l32_i2c_remove
The regulator_bulk_free() call is not required because current code is using
devm_regulator_bulk_get().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:06:44 +01:00
Jarkko Nikula b792346fa8 ASoC: Remove unused cache_only from struct snd_soc_codec
There are no real users for cache_only in "struct snd_soc_codec" so remove
it and needless debugfs node.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:05:57 +01:00
Brian Austin c2b49ae678 ASoC: cs42l56: use true/false returns for bool functions
Return true or false instead of 1 and 0

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:05:10 +01:00
Brian Austin 5c216cc3f3 ASoC: cs42l52: use true/false returns for bool functions
Return true or false instead of 1 and 0

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:04:53 +01:00
Brian Austin 7eef08554c ASoC: cs35l32: use true/false returns for bool functions
Return true or false instead of 1 and 0

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:04:27 +01:00
Paul Handrigan fb18cd2a62 ASoC: cs4265: Fix setting of functional mode and clock divider
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-28 19:01:12 +01:00
Paul Handrigan c98853aec1 ASoC: cs4265: Fix clock rates in clock map table
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-28 19:01:01 +01:00
Paul Handrigan 98c5d36240 ASoC: cs4265: Add CHIP_ID as a readable register
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:00:34 +01:00
Linus Torvalds 521bd5e4d9 sound fixes for 3.17-rc3
Here contains not many exciting changes but just a few minor ones:
 An off-by-one proc write fix, a couple of trivial incldue guard
 fixes, Acer laptop pinconfig fix, and a fix for DSD formats that
 are still rarely used.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJT/w1wAAoJEGwxgFQ9KSmkkMAQAKlRFjLRrcM+y4ly8Gjr1ZTe
 QjkdPBdkQlWiMIPLlX1Xr+pWG5kZiUMiAl5lBkiF6ubcjVYl6KoJGzGzwcAdYkor
 H0tY2+mqinOS9gi3qwnTQjvlhGeTwLqs7hIkIjfaaUHSBn5I6TYsMgMQ2I6Rmo82
 Ox6bhJbunNRhCpyebzTjzgcruGej8FkzpJullWs6XTdxCY2rtFpVn0b6FUgdbab+
 uTgfBeckvtIA327s7qRmWyAOn5t73tCqV3CJ/PnBCXByODiMRrkaM0OLb/O7QvN5
 VTrKyGQyUhf3WNT6R1nuGPbC24ajxu5p0GkSZNuHWoerMIgNobtoBNplzL+P8UUs
 s83Sm21Y7n2jSXPs+rJdjy4MdLng6QcXH/ZoCnpZeIeVxs4qU4O9Q7HMDJZCYS7M
 EEutl8/gt43su4wHO2RGfU3DOIFnjtPQzqqkkwzdwoxB9jhMHfq73qRTrAHC3biB
 hqjRQRcX++Z5C0PPuVUvRSwidWTbeEfot3MvXKXaHyWTojyGRqfKsCXhudFLCNYU
 BlwAxrLI8kWaKdr9oVe+KS1XoBVQJIIar62plwFozTEuHuQ2P0FNpP6MFViPNoFf
 UOHvXCTHi8JaVSBjhlKHrtto2Zcak1tIlQ1Ewog0Wg1cJrDOdWxHEwJ2tUI0N7aC
 fZ3lwxhRarA9URNrjNqV
 =raXL
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here contains not many exciting changes but just a few minor ones: An
  off-by-one proc write fix, a couple of trivial incldue guard fixes,
  Acer laptop pinconfig fix, and a fix for DSD formats that are still
  rarely used"

* tag 'sound-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Set up initial pins for Acer Aspire V5
  ALSA: pcm: Fix the silence data for DSD formats
  ALSA: ctxfi: ct20k1reg: Fix typo in include guard
  ALSA: hda: ca0132_regs.h: Fix typo in include guard
  ALSA: core: fix buffer overflow in snd_info_get_line()
2014-08-28 09:44:25 -07:00
Geert Uytterhoeven 77c545398e ASoC: Allow SND_SOC_WM8978 to be selected manually
When using a DT-based multi-platform kernel, there's not always Kconfig
logic that selects the right codec driver.
Allow the user to manually select WM8978.

This is needed for Armadillo 800 EVA using a generic r8a7740 multi-platform
kernel.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 16:00:54 +01:00
Subhransu S. Prusty 06cb1eb3de ASoC: mfld-compress: Use dedicated function instead of ioctl
Also pass sst device as an argument to function pointer prototypes of
compr_ops. This will be used to derive sst driver context.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 21:48:37 +01:00
Xiubo Li 014fd22ef9 ASoC: fsl-sai: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:29 +01:00
Xiubo Li 664915074e ASoC: fsl-spdif: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:29 +01:00
Xiubo Li 92bd0334b2 ASoC: fsl-esai: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:28 +01:00
Xiubo Li bf16d88326 ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:20 +01:00
Bard Liao 2d15d97461 ASoC: rt5677: Add DMIC2 clock selection
There are two pins can be used for rt5677's DMIC2 clock. This patch
add the select options for it.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 16:54:39 +01:00
Bard Liao 22e51345a9 ASoC: rt5677: correct mismatch widget name
We name MICBIAS1 in dapm widget, but micbias1 in route table.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 16:54:21 +01:00
Jarkko Nikula f4821e8e8e ASoC: rt5640: Do not allow regmap to use bulk read-write operations
Debugging showed Realtek RT5642 doesn't support autoincrementing writes so
driver should set the use_single_rw flag for regmap.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-27 13:00:26 +01:00
Takashi Iwai 1a22e7758e ALSA: hda - Set up initial pins for Acer Aspire V5
Acer Aspire V5 doesn't set up the pins correctly at the cold boot
while the pins are corrected after the warm reboot.  This patch gives
the proper pin configs statically in the driver as a workaround.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81561
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-27 08:19:05 +02:00
Konstantinos Tsimpoukas 890b13a308 ALSA: ice1712: Replacing hex with #defines
Adds to the readability of the ice1712 driver.

Signed-off-by: Konstantinos Tsimpoukas <kostaslinuxxx@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-27 08:17:07 +02:00
Sudip Mukherjee 62afa853cb ALSA: ctxfi: fix broken user-visible string
as broken user-visible strings breaks the ability to grep for them , so this patch fixes the broken user-visible strings

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-26 15:41:07 +02:00
Sudip Mukherjee e720b82027 ALSA: ctxfi: prink replacement
as pr_* macros are more preffered over printk, so printk replaced with corresponding pr_err and pr_alert
this patch will generate a warning from checkpatch for an unnecessary space before new line and has not been fixed as this patch is only for printk replacement.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-26 15:40:54 +02:00
Lars-Peter Clausen 5819c2fa55 ASoC: Restore idle_bias_off initialization
This was accidentally lost in commit f1d45cc3ae ("ASoC: Consolidate
platform and CODEC probe/remove").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-26 09:15:15 +01:00
Sudip Mukherjee 57f2d8b797 ALSA: ctxfi: ctpcm.c: printk replacement
replaced printk with corresponding pr_err

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-25 16:02:18 +02:00
Lars-Peter Clausen a18a32ce22 ASoC: ac97-codec: Remove ASoC level IO support
This driver doesn't use any ASoC level IO nor does it register any controls
or DAPM elements that require it. This means it can safely be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-23 10:11:36 -05:00
Rasmus Villemoes d50884afdf ASoC: tegra: Fix typo in include guard
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-22 13:35:44 -05:00
Rasmus Villemoes aa47746269 ASoC: da732x: Fix typo in include guard
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-22 13:34:39 -05:00
Takashi Iwai 94a988a8ab ALSA: pcm: Fix the silence data for DSD formats
Right now we set 0 as the silence data for DSD_U8 and DSD_U16 formats,
but this is actually wrong.  0 is rather the most negative value.
Alternatively, we may take the repeating 0x69 pattern like ffmpeg
deploys.

Reference: https://ffmpeg.org/pipermail/ffmpeg-cvslog/2014-April/076427.html
Suggested-by: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22 11:24:58 +02:00
Rasmus Villemoes ee3043b2d7 ALSA: ctxfi: ct20k1reg: Fix typo in include guard
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22 11:24:57 +02:00
Rasmus Villemoes 3c25d04129 ALSA: hda: ca0132_regs.h: Fix typo in include guard
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22 11:24:11 +02:00
Clemens Ladisch ddc64b278a ALSA: core: fix buffer overflow in snd_info_get_line()
snd_info_get_line() documents that its last parameter must be one
less than the buffer size, but this API design guarantees that
(literally) every caller gets it wrong.

Just change this parameter to have its obvious meaning.

Reported-by: Tommi Rantala <tt.rantala@gmail.com>
Cc: <stable@vger.kernel.org> # v2.2.26+
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22 07:21:05 +02:00
Linus Torvalds e9d99a1dec sound fixes for 3.17-rc2
A bunch of ASoC fixes with a few HD-audio fixes in this pull request.
 All fairly small, boring and device-specific fixes, in addition to
 MAINTAINERS update for better reviewing.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJT9b8uAAoJEGwxgFQ9KSmkOZUP/RmB+4/vscB3z+exCFldIG3R
 gHOn4ER/JRWoObVVST3VabU5T5v88/gC2/12uYHFJQdDIwaMQytdVMDzhi6v8Uyf
 MFh24DcHQ7dRsedCCrUeoy2DZ42G+HhPH+SRGinkFUZ0RJjnCgqvyYw1p6KZD29K
 AuB07FbgmThqRVyoZoMh3K7zm8d/ZeZU59SkyGi2U8dhCfgZyrsYZ1jHd/fGuwq4
 XgJIJvHWZoniFnnxoVW/r9wutbF5JSf/FbwRI7ptZT0Rj/u+PcgDPmrhYPINFkt2
 IrIt/ZnGadKZuiK9p+aSSIUPWluVjyChCwskkWfKtg+5N4FOFed48HjZNw5TVsdc
 deJjao7dtyqxugMcA2E6VkWqTprFRhRbauT0WU7KX54HBrnng3792YGLJqqqggCE
 bAP5crrT1wMjk7qXPLouk0TvcXbSkCYQ53Ip+QITGNkLUiN0tj8cgbsfPjDU4GvH
 T9tz0I5thLkKp4xP3xSEphQdaLdmG0zGiBcoOH/6jByUxvQdiQimo7a1YEuxtFN2
 sIGbrpM8k9ypfJaOpqoh6FtHRL9Y41W1guY4TqUm+QZbLw9KQn1QRe9HQF5M6kU+
 vsIoVR8UGTudaLG/AIg+YFEbSsTcTlCNHw1iXYxmqj5pP5J+N0N/aNIFYeObWkcO
 8O9/WAwBUdH0cVdXoWze
 =x5gm
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A bunch of ASoC fixes with a few HD-audio fixes in this pull request.

  All fairly small, boring and device-specific fixes, in addition to
  MAINTAINERS update for better reviewing"

* tag 'sound-3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/hdmi - apply Valleyview fix-ups to Cherryview display codec
  ALSA: hda/hdmi - set depop_delay for haswell plus
  ALSA: hda - restore the gpio led after resume
  ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co
  ASoC: pxa-ssp: drop SNDRV_PCM_FMTBIT_S24_LE
  ASoC: fsl-esai: Revert .xlate_tdm_slot_mask() support
  ASoC: mcasp: Fix implicit BLCK divider setting
  ASoC: arizona: Fix TDM slot length handling in arizona_hw_params
  ASoC: pcm512x: Correct Digital Playback control names
  ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double()
  ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset
  ASoC: Intel: Wait Baytrail ADSP boot at resume_early stage
  ASoC: Intel: Merge Baytrail ADSP suspend_noirq into suspend_late
  MAINTAINERS: Add i.MX maintainers and paths to Freescale ASoC entry
  ASoC: Intel: Update Baytrail ADSP firmware name
2014-08-21 14:24:40 -07:00
Lars-Peter Clausen ff495d3a8e ASoC: txx9: Don't opencode DMAengine API calls
Use the proper wrapper functions instead of directly calling the DMAengine
callback functions.

Also add the missing include to linux/dmaengine.h.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 11:44:18 -05:00
Lars-Peter Clausen 5d0ecb0e7d ASoC: sh: Don't opencode DMAengine API calls
Use the proper wrapper functions instead of directly calling the DMAengine
callback functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 11:40:11 -05:00
Shengjiu Wang 38c6e4bb67 ASoC: fsl-asoc-card: move 'config SND_SOC_FSL_ASOC_CARD' to 'if SND_IMX_SOC'
Build kernel with SND_SOC_FSL_ASOC_CARD=m && SND_SOC_FSL_{SSI,SAI,ESAI}=y
leads the following error:

   sound/built-in.o: In function `fsl_sai_probe':
>> fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
   sound/built-in.o: In function `fsl_esai_probe':
>> fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'

The config SND_SOC_FSL_ASOC_CARD is for IMX SOC, So move it under condition
of 'if SND_IMX_SOC'.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 11:11:50 -05:00
Lars-Peter Clausen c5599b87a8 ASoC: Replace list_empty(&card->codec_dev_list) with !card->instantiated
With componentization we no longer necessarily need a snd_soc_codec struct for a
card. Instead of checking if the card's CODEC list is empty just use
card->instantiated to check if the card has been instantiated yet.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:48 -05:00
Lars-Peter Clausen 75af7c0819 ASoC: Remove support for legacy snd_soc_platform IO
There were never any actual users of this in upstream and by we have with
regmap a replacement in place, which should be used by new drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen 886f569225 ASoC: Automatically initialize regmap for all components
So far regmap is only automatically initialized for CODECs. Now that we have the
infrastructure in place to let components have DAPM widgets and controls that
want to use the generic regmap based IO also make sure to automatically
initialize regmap for all components.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen 14621c7e5e ASoC: Consolidate CPU and CODEC DAI lookup
The lookup of CPU and CODEC DAIs is fairly similar and can easily be
consolidated into a single helper function.

There are two main differences in the current implementation of the CPU and
CODEC DAI lookup:
 1) CPU DAIs can be looked up by the DAI name alone and do not necessarily
   require a component name/of_node.
 2) The CODEC DAI search only considers DAIs from CODEC components.

For 1) the new helper function will allow to lookup DAIs without providing a
component name or of_node, but since snd_soc_register_card() already rejects
CODEC DAI link components without neither a of_node or a name we'll never get
into the situation where we try to lookup a CODEC DAI without a name/of_node.
For 2) the new helper function just always considers all components.
Componentization is now at a point where it is possible to register a CODEC as a
snd_soc_component rather than a snd_soc_codec, by considering DAIs from all
components it is possible to use such a CODEC in a DAI link.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen e60cd14f0b ASoC: Consolidate CPU and CODEC DAI removal
CPU and CODEC DAI works exactly the same way. There is already a helper function
for CODEC DAI removal, use that one as well for CPU DAI removal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen ffbd7dd72b ASoC: Cleanup DAI module reference counting
Currently when a DAI has no CODEC associated to it the reference on the module
containing the DAI driver is increased when the DAI is probed and decrease when
the DAI is removed. For DAIs with CODECs the module reference count was already
incremented when the CODEC is probed. Now that all components have their module
reference count incremented when they are probed and all DAIs do have a
component it is possible to remove the module reference counting on DAI probe
and removal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:46 -05:00
Lars-Peter Clausen 70090bbb8b ASoC: Move component->probed check into soc_{remove,probe}_component()
Having the check in a centralized place makes the code a bit cleaner and
shorter.

Note: There is a slight semantic change in this patch. soc_probe_aux_dev() will
no longer return -EBUSY if the AUX dev has already been probed before. This is
fine though since it will simply do nothing in that case and return success.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:46 -05:00
Lars-Peter Clausen 57bf772687 ASoC: Pass component instead of DAPM context to AUX dev init callback
Given that the component is the containing structure it makes more sense to pass
the component rather than the DAPM context to the AUX dev init callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:46 -05:00
Lars-Peter Clausen 65d9361f0c ASoC: Move AUX dev support to the component level
This patch makes it possible to register arbitrary components as a AUX dev
for a card. This was previously only possible for CODEC components. With
componentization having made it possible for components to have DAPM contexts
and controls there is no reason why AUX devs should be artificially limited to
snd_soc_codec devices.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen 61aca5646b ASoC: Add component level probe/remove support
Now that we have a unified probe and remove path make sure to call them for all
components. soc_{probe,remove}_component are responsible for setting up the DAPM
context for the component, initialize the component prefix, manage the debugfs
entries as well as do the registration of table based controls and DAPM
elements. They also call the component drivers probe and remove callbacks. This
patch makes these things available for generic snd_soc_component drivers rather
than only having them for snd_soc_codec and snd_soc_platform drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen 93c3ce76cc ASoC: Make rtd->codec optional
There are some place in the ASoC core that expect rtd->codec to be non NULL
(mainly CODEC specific sysfs files). With componentization going forward
rtd->codec might be NULL in some cases. This patch prepares the core for this by
not registering CODEC specific sysfs files if rtd->codec is NULL. sysfs file
removal does not need to be conditionalized as it handles the removal of
non-existing files just fine.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen f1d45cc3ae ASoC: Consolidate platform and CODEC probe/remove
The platform and CODEC probe and remove code is now largely identical. This
patch consolidates it at the component level.

The resulting code is slightly larger due to all the boiler plate code setting
up the indirection for the table based control and DAPM registration.  Once all
drivers have been update to no longer use the snd_soc_codec_driver and
snd_soc_platform_driver specific fields for this the indirection can be removed
again.

This patch contains two noteworthy hacks that are only meant to be temporary to
be able to update drivers and the core in separate incremental patches.

The first hack is related to that some DPCM platforms expect that the DAPM
widgets for the DAIs of a snd_soc_component are created in the DAPM context of
the snd_soc_platform that has the same parent device. For handling this the
steal_sibling_dai_widgets attribute is introduced. It gets set for
snd_soc_platforms that register DAPM elements. When creating the DAI widgets for
a component this flag is checked and if it is found on one of the siblings the
component will not create any DAI widgets in its own DAPM context. If the
attribute is set on a platform it will look for siblings components and create
DAI widgets for them in its own context. The fix for this will be to update
the offending drivers to only register a single component rather than two.

The second hack deals with the fact that the ASoC card suspend and resume code
still needs a list of CODECs that have been registered for the card. To handle
this the generic probe and remove path have a check to see if the component is
CODEC and if yes add/remove it to the card's CODEC list. While it is possible to
clean up the suspend/resume code to not need the CODEC list anymore this is a
bit of a chicken and egg problem since it will become easier to clean up the
suspend/resume code once there is a unified component layer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen 81c7cfd1b2 ASoC: Move debugfs registration to the component level
The debugfs registration is mostly identical between platforms and CODECs. This
patches consolidates the two implementations at the component level.

Unfortunately there are still a couple of CODEC specific debugfs files that are
related to legacy ASoC IO that need to be registered. For this a new callback is
added to the component struct that will be initialized when a CODEC is
registered and will be used to register the CODEC specific files. Once there are
no drivers left using legacy IO this can be removed again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Sean Cross cdec729765 ASoC: fsl: Fix building of imx-es8328 on PPC
The imx-es8328 driver fails to build on PPC because it explicitly depends on
SND_SOC_IMX_PCM_FIQ, which itself doesn't build on PPC.  Instead, rely on
the SND_SOC_FSL_SSI config option to pull in the necessary libraries.

While we're at it, remove SND_SOC_FSL_UTILS, which also is not needed.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:43:45 -05:00
Libin Yang ca2e7224d7 ALSA: hda/hdmi - apply Valleyview fix-ups to Cherryview display codec
Valleyview and Cherryview have the same behavior on display audio. So this patch
defines is_valleyview_plus() to include codecs for both Valleyview and its successor
Cherryview, and apply Valleyview fix-ups to Cherryview.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 10:24:46 +02:00
Libin Yang d35f64e748 ALSA: hda/hdmi - set depop_delay for haswell plus
Both Haswell and Broadwell need set depop_delay to 0. So apply this
setting to haswell plus.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 10:24:37 +02:00
Takashi Iwai 54db6c3949 ALSA: hda/realtek - Use tables for batch COEF writes/updtes
There are many codes doing writes or updates COEF verbs sequentially
in a batch.  Rewrite such open codes with tables for optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 08:04:35 +02:00
Takashi Iwai 98b2488394 ALSA: hda/realtek - Add alc_update_coef*_idx() helper
... and rewrite a few open codes with them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 08:04:34 +02:00
Takashi Iwai 1687ccc8b2 ALSA: hda/realtek - Use alc_write_coef_idx() in alc269_quanta_automake()
Just a refactoring.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 08:04:32 +02:00
Takashi Iwai f2a227cd38 ALSA: hda/realtek - Optimize alc888_coef_init()
Just a refactoring using the existing helper functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 08:04:31 +02:00
Takashi Iwai e52faba0f3 ALSA: hda - Remove obsoleted EXPORT_SYMBOL_HDA() macro
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 08:04:29 +02:00
Takashi Iwai e9bd0224c1 ALSA: hda - Remove obsoleted snd_hda_check_board_config() & co
The helper functions snd_hda_check_board_config() and
snd_hda_check_board_codec_sid_config() are no longer used since the
transition to the generic parser and all quirks have been replaced
with fixups.  Let's kill these dead codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 08:04:28 +02:00
Takashi Iwai 1aaff09695 Merge branch 'for-linus' into topic/hda-cleanup
Syncing the HD-audio updates for further cleanup works.
2014-08-19 08:04:02 +02:00
Hui Wang f475371aa6 ALSA: hda - restore the gpio led after resume
On some HP laptops, the mute led is controlled by codec gpio.

When some machine resume from s3/s4, the codec gpio data will be
cleared to 0 by BIOS:
Before suspend:
  IO[3]: enable=1, dir=1, wake=0, sticky=0, data=1, unsol=0
After resume:
  IO[3]: enable=1, dir=1, wake=0, sticky=0, data=0, unsol=0

To skip the AFG node to enter D3 can't fix this problem.

A workaround is to restore the gpio data when the system resume
back from s3/s4. It is safe even on the machines without this
problem.

BugLink: https://bugs.launchpad.net/bugs/1358116
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-19 07:57:46 +02:00
Xiubo Li 8ea2134886 ASoC: simple-card: Fix the compile warning.
sound/soc/generic/simple-card.c: In function simple_card_dai_link_of:
sound/soc/generic/simple-card.c:198:10: warning: passing argument 3 of
asoc_simple_card_sub_parse_of from incompatible pointer type [enabled by default]
          &dai_link->cpu_dai_name);
          ^
sound/soc/generic/simple-card.c:112:1: note: expected const struct device_node **
but argument is of type struct device_node **
 asoc_simple_card_sub_parse_of(struct device_node *np,
 ^
sound/soc/generic/simple-card.c:229:10: warning: passing argument 3 of
asoc_simple_card_sub_parse_of from incompatible pointer type [enabled by default]
          &dai_link->codec_dai_name);
          ^
sound/soc/generic/simple-card.c:112:1: note: expected const struct device_node **
but argument is of type struct device_node **
 asoc_simple_card_sub_parse_of(struct device_node *np,
 ^

Since the asoc_simple_card_sub_parse_of() is used in simple-card module only,
and the third argument is just used to get the node ponters address, so there is
no need it must to be 'const' type.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 11:42:05 -05:00
Shengjiu Wang 499898d66d ASoC: fsl: fsl-asoc-card: Select SND_SOC_IMX_AUDMUX
Building kernel with SND_SOC_IMX_AUDMUX=n leads to the following error:

   sound/built-in.o: In function `fsl_asoc_card_probe':
>> fsl-asoc-card.c:(.text+0x1467b5): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x1467d0): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x1467ed): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x146807): undefined reference to `imx_audmux_v2_configure_port'

Update Kconfig to select SND_SOC_IMX_AUDMUX when SND_SOC_FSL_ASOC_CARD=y.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 09:54:04 -05:00
Shengjiu Wang 5f37671e00 ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized
When build fsl-asoc-card as module, there is following error:

sound/soc/fsl/fsl-asoc-card.c: In function 'fsl_asoc_card_probe':
>> sound/soc/fsl/fsl-asoc-card.c:547:13: warning: 'asrc_np' may be used uninitialized in this function [-Wmaybe-uninitialized]
     of_node_put(asrc_np);
                ^

vim +/asrc_np +547 sound/soc/fsl/fsl-asoc-card.c

   531                  if (width == 24)
   532                          priv->asrc_format = SNDRV_PCM_FORMAT_S24_LE;
   533                  else
   534                          priv->asrc_format = SNDRV_PCM_FORMAT_S16_LE;
   535          }
   536
   537          /* Finish card registering */
   538          platform_set_drvdata(pdev, priv);
   539          snd_soc_card_set_drvdata(&priv->card, priv);
   540
   541          ret = devm_snd_soc_register_card(&pdev->dev, &priv->card);
   542          if (ret)
   543                  dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
   544
   545  fail:
   546          of_node_put(codec_np);
 > 547          of_node_put(asrc_np);
   548          of_node_put(cpu_np);
   549
   550          return ret;
   551  }
   552
   553  static const struct of_device_id fsl_asoc_card_dt_ids[] = {
   554          { .compatible = "fsl,imx-audio-cs42888", },
   555          { .compatible = "fsl,imx-audio-sgtl5000", },

Add 'asrc_fail' branch for error jump after asrc_np initialized.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 09:52:51 -05:00
Lars-Peter Clausen 6391fffb7b ASoC: ab8500-codec: Drop bank prefix from AB8500_GPIO_DIR4_REG register define
The AB8500_GPIO_DIR4_REG register define has the bank for the register in the
upper 8 bits and the register itself in the lower 8 bits. When passing it to
abx500_{set,get}_register_interruptible() the upper bits get truncated which
generates the following warning from sparse:
	sound/soc/codecs/ab8500-codec.c:1972:53: warning: cast truncates bits
	 from constant value (1013 becomes 13)
	sound/soc/codecs/ab8500-codec.c:1980:53: warning: cast truncates bits
	 from constant value (1013 becomes 13)

The bank is passed separately to abx500_{set,get}_register_interruptible() so
the code works fine as it is. Given that all users of AB8500_GPIO_DIR4_REG
always truncate the upper 8 bits just remove them from the define.

Also remove the unnecessary casts to u8.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:35:58 -05:00
Lars-Peter Clausen e8a70c25b8 ASoC: samsung idma: Add proper annotation for casting iomem pointers
It is not always possible to interchange iomem pointers with normal pointers,
which why we have annotations for iomem pointers and warn when casting them to a
normal pointer or vice versa. In this case the casting is fine and unfortunately
necessary so add the proper annotations to tell code checkers that it is
intentional. This silences the following warnings from sparse:
	sound/soc/samsung/idma.c:354:20: warning: incorrect type in argument 1
	 (different address spaces) expected void volatile [noderef]
	  <asn:2>*addr got unsigned char *area
	sound/soc/samsung/idma.c:372:22: warning: cast removes address space of
	 expression

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:34:45 -05:00
Lars-Peter Clausen 6c7d1dfca9 ASoC: sh: Fix dma direction type
dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a
enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE
and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same
value the code worked fine even though it was using the wrong type.

Fixes the following warnings from sparse:
	sound/soc/sh/fsi.c:1307:42: warning: mixing different enum types
	sound/soc/sh/fsi.c:1307:42:     int enum dma_data_direction  versus
	sound/soc/sh/fsi.c:1307:42:     int enum dma_transfer_direction

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:34:05 -05:00
Lars-Peter Clausen c8e6e96073 ASoC: rcar: Use && instead of & for boolean expressions
Sparse spits out the following warning:
	sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y

It does this because sometimes mixing boolean and bit-wise logic has not the
intended result. In this case we are fine, but replacing the bit-wise '&' with
the boolean '&&' silences the sparse warning. The generated code for both cases
is the same.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:33:11 -05:00
Lars-Peter Clausen d80a12f924 ASoC: odrodix2_max98090: Make non exported symbols static
odroidx2_drvdata and odroidu3_drvdata are not used outside this module so make
them static (and also const while we are at it).

Fixes the following warnings from sparse:
    sound/soc/samsung/odroidx2_max98090.c:69:26: warning: symbol
     'odroidx2_drvdata' was not declared. Should it be static?
    sound/soc/samsung/odroidx2_max98090.c:74:26: warning: symbol
     'odroidu3_drvdata' was not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:31:52 -05:00
Lars-Peter Clausen 371e07ec83 ASoC: edma-pcm: Include edma-pcm.h
edma_pcm_platform_register() is declared in edma-pcm.h and defined in
edma-pcm.c. To make sure that the function signature matches for both
edma-pcm.c should include edma-pcm.h

Fixes the following sparse warning:
	sound/soc/davinci/edma-pcm.c:48:5: warning: symbol
	 'edma_pcm_platform_register' was not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:31:06 -05:00
Lars-Peter Clausen f294afed03 ASoC: Use dev_set_name() instead of init_name
init_name is basically a hack and should only be used for statically allocated
device structs. For dynamically allocated devices dev_set_name() should be used.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 08:22:18 -05:00
Lars-Peter Clausen 8a36eaa2ff ASoC: dmic: Add to SND_SOC_ALL_CODECS
Improve build coverage of the dmic driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 08:21:56 -05:00
Nicolin Chen 855675f6e6 ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode
There is one design rule according to SAI's reference manual:
If the transmitter bit clock and frame sync are to be used by both transmitter
and receiver, the transmitter must be configured for asynchronous operation
and the receiver for synchronous operation.

And SYNC of TCR2 is a 2-width control bit:
00 Asynchronous mode.
01 Synchronous with receiver.
10 Synchronous with another SAI transmitter.
11 Synchronous with another SAI receiver.

So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC
bit of RCR2 to 0x1 (Synchronous with transmitter).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:30:45 -05:00
Mark Brown 6be1f475e0 Merge branch 'fix/fsl-esai' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-esai 2014-08-16 17:22:36 -05:00
Sean Cross 7e7292dba2 ASoC: fsl: add imx-es8328 machine driver
This adds an initial machine driver for the ES8328 audio codec on Freescale
boards.  The driver supports headphones and an audio regulator for an onboard
speaker amp.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:18:07 -05:00
Mark Brown e1a65374a3 Merge branch 'topic/es8328' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl 2014-08-16 17:18:02 -05:00
Sean Cross 567e4f9892 ASoC: add es8328 codec driver
Add a codec driver for the Everest ES8328.  It supports two separate audio
outputs and two separate audio inputs.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:17:13 -05:00
Nikesh Oswal dfe8f1f3f2 ASoC: wm8994: Demux the microphone detection IRQ
Current code only allows direct routing of the WM8994 microphone
detection signal to a GPIO this change adds support to demux the
interrupt from the main interrupt line of the codec.

Signed-off-by: Nikesh Oswal <nikesh@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:08:13 -05:00
Dan Murphy a7a8e994dd ASoC: tas2552: Add DAPM calls for amp and PLL
Add DAPM calls to enable/disable the Class D amp.
Also add a DAPM call to turn off the PLL upon
the stream completing.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:49 -05:00
Rongjun Ying 0d985b1c76 ASoC: sirf: usp: Add bitclock inversion support
Signed-off-by: Rongjun Ying <rongjun.ying@csr.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:42 -05:00
Julia Lawall a493b6a637 ASoC: rsnd: delete unneeded test before of_node_put
Of_node_put supports NULL as its argument, so the initial test is not
necessary.

Suggested by Uwe Kleine-König.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@

-if (e)
   of_node_put(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:36 -05:00
Vinod Koul d8499c9b4b ASoC: Intel: add mrfld DSP defines
We define the DSP commands,structures here which will be used to send the IPCs

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Subhransu S. Prusty b12b087c87 ASoC: Intel: mfld-pcm: Change sst_ops prototypes to take dev parameter
sst_ops need to use the sst driver context. So pass sst device as argument,
which can be used to retrieve sst context.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Subhransu S. Prusty 5981c2d6db ASoC: Intel: mfld-pcm: Use function instead of ioctl
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Vinod Koul ea5edfe2f1 ASoC: Intel: Fix to use byte control interface
Using a byte control interface instead of generic_params ioctl.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Nicolin Chen ce7344a4eb ASoC: fsl_sai: Make Synchronous and Asynchronous modes exclusive
The previous patch (ASoC: fsl_sai: Add asynchronous mode support) added
new Device Tree bindings for Asynchronous and Synchronous modes support.
However, these two shall not be present at the same time.

So this patch just simply makes them exclusive so as to avoid incorrect
Device Tree binding usage.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Nicolin Chen 08fdf65e37 ASoC: fsl_sai: Add asynchronous mode support
SAI supports these operation modes:
1) asynchronous mode
   Both Tx and Rx are set to be asynchronous.
2) synchronous mode (Rx sync with Tx)
   Tx is set to be asynchronous, Rx is set to be synchronous.
3) synchronous mode (Tx sync with Rx)
   Rx is set to be asynchronous, Tx is set to be synchronous.
4) synchronous mode (Tx/Rx sync with another SAI's Tx)
5) synchronous mode (Tx/Rx sync with another SAI's Rx)

* 4) and 5) are beyond this patch because they are related with another SAI.

As the initial version of this SAI driver, it supported 2) as default while
the others were totally missing.

So this patch just adds supports for 1) and 3).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Nicolin Chen af96ff5b74 ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode
There is one design rule according to SAI's reference manual:
If the transmitter bit clock and frame sync are to be used by both transmitter
and receiver, the transmitter must be configured for asynchronous operation
and the receiver for synchronous operation.

And SYNC of TCR2 is a 2-width control bit:
00 Asynchronous mode.
01 Synchronous with receiver.
10 Synchronous with another SAI transmitter.
11 Synchronous with another SAI receiver.

So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC
bit of RCR2 to 0x1 (Synchronous with transmitter).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Nicolin Chen 376d1a92ca ASoC: fsl_sai: Initialize with software reset
This patch adds software reset code in dai_probe() so as to make a true init
by clearing SAI's internal logic, including the bit clock generation, status
flags, and FIFO pointers.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Shengjiu Wang de0d712a6d ASoC: fsl_esai: refine esai for TDM support
Original driver didn't store the number of slots, just fix the slot number
to 2, use this default number to calculate bclk and pins for TX/RX.
In this patch, add one parameter for slots, and update the calculation of
bclk and pins of TX/RX. Then driver will be compatible with slots > 2 in
TDM mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:15 -05:00
Nicolin Chen 708b4351f0 ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support
The Freescale Generic ASoC Sound Card is a general ASoC DAI Link driver that
can be used, ideally, for all Freescale CPU DAI drivers and external CODECs.

The idea of this generic sound card is a bit like ASoC Simple Card. However,
for Freescale SoCs (especially those released in recent years), most of them
have ASRC (Documentation/devicetree/bindings/sound/fsl,asrc.txt) inside. And
this is a specific feature that might be painstakingly controlled and merged
into the Simple Card driver.

So having this driver will allow all Freescale SoC users to benefit from the
simplification to support a new card and the capability of wide sample rates
support through ASRC.

The driver is initially designed for sound card using I2S or PCM DAI formats.
However, it's also possible to merge those non-I2S/PCM type sound cards, such
as S/PDIF audio and HDMI audio, into this card as long as the merge will not
break the original function and as long as there is something redundant that
can be abstracted along with I2S type sound cards.

As an initial version, it only supports three cards that I can test:
imx-audio-cs42888, a new card that links ESAI with CS42888 CODEC
imx-audio-sgtl5000, just like the old imx-sgtl5000.c driver
imx-audio-wm8962, just like the old imx-wm8962.c driver

The driver is also compatible with the old Device Tree bindings of WM8962 and
SGTL5000. So we may consider to remove those two drivers after this driver is
totally enabled. (It needs to be added into defconfig)

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:03:50 -05:00
Brian Austin 38f57532ed ASoC: cs35l32: fix compile warning for i2c_probe
Forgot to add a return for err_disable goto statement.
Causes compile warning of control reaching end of non-void

Signed-off-by: Brian Austin <briann.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:03:22 -05:00
Brian Austin eef5bb2445 ASoC: cs35l32: Add support for CS35L32 Boosted Amplifier
This patch adds support for the Cirrus Logic CS35L32 Boosted Amplifier
I2S output provides monitor data to the SOC/CODEC/DSP for speaker protection/enhancement algorithms

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:03:22 -05:00
Takashi Iwai f3ee07d8b6 ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co
ALC269 & co have many vendor-specific setups with COEF verbs.
However, some verbs seem specific to some codec versions and they
result in the codec stalling.  Typically, such a case can be avoided
by checking the return value from reading a COEF.  If the return value
is -1, it implies that the COEF is invalid, thus it shouldn't be
written.

This patch adds the invalid COEF checks in appropriate places
accessing ALC269 and its variants.  The patch actually fixes the
resume problem on Acer AO725 laptop.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181
Tested-by: Francesco Muzio <muziofg@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-16 09:10:26 +02:00
Takashi Iwai 01d5500f35 ASoC: Fixes for v3.17
Nothing too exciting here, a bunch of driver fixes that came along since
 the initial pull request but none that really stand our and a warning
 fix in the core.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT7os8AAoJELSic+t+oim99QYP/2BTI4QGNCZLfptP58VuWZW2
 B4fP2TLG/JrJ6g1aCBooD0qZmzSte1OomOa9PyKpxPLgklBIPxInKiJgTF5P+QJh
 h8zBYKYdNr1yZfC/pUac908EN+S5KbUql1tkouHLE1ut5OxazzCfCg9PttJ7Fi4N
 PpuOMCqfAMpFyEZ9FOiaZ/jBxkQR4Oax2+0WhsrXYe6PP1vM8mGtDUnJg4DzTyQn
 yieBmCVaeGZgD20bccV3SwMcqeFmY9OQWWxoojhcu2HyZbYmjUojQHIW2ac4CyJy
 6r6fzWTWp8Xa3s1UGtKx6jjOGcoNQTXyCpt0r6zHXtSeHhdLkTSqwkh8Lz+FyW81
 irUP6S2EQAV1TPyiP21ECYrOe9/eIzq1si1xQx2eA7UyuzRwcMLw8Fl35yk5FUIN
 PHJgCVdqvd5hxZ0OoPTwUCeqdL1xHrzH/6ttzd2wS/Qn7PTxVSUWsypyOL8JlCMf
 WyZWAZKvdrFgSmW+5ismBDzmReJiojxfjc2Gt3gOQU4FUWe541IT5xoQG17XOgqw
 7FItJfVBSi43wYIcPOA6/CiWBhSqsadNXWfwfVlsxmdvl4n6dI2UCj2qeb/fsr8g
 0IclAfN9zvHX7GGyxtO4rlYNXErCFGiOnqkHXtbEpsTlxbjz8D7PEz5UycdWvWNO
 IODBzJ31cFgE1T9sN8Hq
 =kDBb
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.17

Nothing too exciting here, a bunch of driver fixes that came along since
the initial pull request but none that really stand our and a warning
fix in the core.
2014-08-16 09:10:19 +02:00