Commit graph

18696 commits

Author SHA1 Message Date
Lars-Peter Clausen
797f283b61 ASoC: Remove runtime field from DAI
This was initially removed in commit 6423c1875 ("ASoC: Remove runtime field from
DAI"), but was, presumably by accident, brought back in commit f0fba2ad1 ("ASoC:
multi-component - ASoC Multi-Component Support"). But has never been
initialized to anything but NULL ever since. This commit removes it again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:08:36 +01:00
Lars-Peter Clausen
b74f7be90f ASoC: atmel-pcm-pdc: Remove broken suspend/resume code
Suspend/resume support for the atmel-pcm-pdc driver was broken in commit
f0fba2ad1 ("ASoC: multi-component - ASoC Multi-Component Support"). It
essentially reverted the modifications done in commit 10cab262 ("ASoC: Change
how suspend and resume obtain the PCM runtime"). The suspend and resume handlers
at the beginning check if dai->runtime is not NULL, but dai->runtime is always
NULL, hence the code never runs. Considering that nobody noticed any problems in
the last 4 years since the code was broken and that the driver does not set
SNDRV_PCM_INFO_RESUME, which means applications are expected to stop and restart
the audio stream during suspend/resume, it is probably safe to assume that his
code is not needed and can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:08:36 +01:00
Lars-Peter Clausen
ce85a4d726 ASoC: dapm: Fix SUSPEND -> OFF bias sequence
Currently when the DAPM context bias level is SUSPEND and the target bias level
is OFF dapm_pre_sequence_async() will first transition to PREPARE and
dapm_post_sequence_async() will then transition back from PREPARE to STANDBY and
then to OFF.

This patch makes sure that dapm_pre_sequence_async() only transitions to PREPARE
when either going to ON or away from ON. This avoids the extra unnecessary
transitions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:06:34 +01:00
Jarkko Nikula
6fb8b02b4b ASoC: Intel: Allow byt-5640 machine driver and SST core go to suspend
Since there is no support for compressed audio in Baytrail ADSP firmware
there is no need to leave it on during suspend since ALSA PCM buffers are
too small for leaving ADSP on for playing or recording.

Implement PM callbacks to Baytrail byt-rt5640.c machine driver that call
snd_soc_suspend and snd_soc_resume functions and unset the ignore_suspend
fields in DAI links.

This makes soc-core and ALSA core gracefully suspend and resume active
stream and call sst_byt_pcm_trigger() during suspend-resume cycle.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:02:18 +01:00
Liam Girdwood
af94aa558b ASoC: Intel: Add Baytrail suspend/resume support
Add suspend and resume support to Baytrail SST DSP. This is implemented by
unloading firmware modules and putting DSP into reset prior suspend and
restarting DSP again in normal boot state after resume.

Context restore for running streams is implemented by scheduling a work from
sst_byt_pcm_trigger() that will allocate a stream with existing parameters
and start it from last known buffer position before suspend.

[Jarkko: Squashed together 5 WIP patches from Liam and 1 from me]

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:02:18 +01:00
Liam Girdwood
609a13e5c9 ASoC: Intel: Allow Rx/Tx message list can be cleared prior to suspend
Suspend/resume requires reloading FW to boot state so we need to also make
sure that the driver matches the FW state at boot.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:02:17 +01:00
Jarkko Nikula
800be5900b ASoC: Intel: Move Baytrail extended fw address saving to sst_byt_boot()
We have to save the physical address of extended firmware block in the
beginning of mailbox every time when we boot the DSP firmware since that
mailbox address is re-used after DSP firmware is running. Otherwise DSP
firmware will get bogus extended firmware block address during next DSP
boot.

Currently this is not problem but becomes when DSP runtime rebooting is
implemented. Prepare for that by moving extended firmware address saving
from sst_byt_init() to sst_byt_boot().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:02:17 +01:00
Jarkko Nikula
a6686ed553 ASoC: Intel: Pass stream start position to sst_byt_stream_start()
Stream start position will be needed in resume code. Prepare for it by
adding start offset argument to sst_byt_stream_start().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:02:17 +01:00
Jarkko Nikula
65ee9e8fb6 ASoC: Intel: Simplify Baytrail stream control IPC construction
Baytrail ADSP stream IPC simplifies a little by moving IPC_IA_START_STREAM
construction and sending directly into sst_byt_stream_start() from
sst_byt_stream_operations(). This is because IPC_IA_START_STREAM is only
stream IPC with extra message data so this move saves a few code lines.

Main motivation for this is to prepare for passing stream start position
to sst_byt_stream_start() which will be needed in resume code.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:02:17 +01:00
Jarkko Nikula
c83649e3cd ASoC: Intel: Sample Baytrail DSP DMA pointer only after each period
This is for preparing suspend/resume support but can give also more
safeguard against concurrent timestamp structure access between DSP firmware
and host.

Now DSP DMA pointer is sampled in each pcm pointer callback in
sst_byt_pcm_pointer() but that is unneeded since DSP updates the timestamp
period basis and can potentially be racy if sst_byt_pcm_pointer() is called
when DSP is updating the timestamp.

By taking DSP DMA pointer only after period elapsed IPC messages in
byt_notify_pointer() and returning stored hw pointer in
sst_byt_pcm_pointer() there is less risk for concurrent access.

The same stored hw pointer can be also used in suspend/resume code for
restarting the stream at the same position.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 22:02:17 +01:00
Lars-Peter Clausen
94986198f5 ASoC: dapm: Handle SND_SOC_DAPM_REG() generically
Commit commit de9ba98b6d ("ASoC: dapm: Make widget power register settings more
flexible") added generic support for on_val/off_val in the DAPM core. With this
in place there is no need anymore for having a special event callback for
SND_SOC_DAPM_REG() widgets.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 21:48:08 +01:00
Lars-Peter Clausen
0f9bd7b194 ASoC: dapm: Simplify snd_soc_dapm_link_dai_widgets()
If we find a widget who's stream name matches the name of a DAI widget then
thats the one it should be connected to. Based on the widget id we can say in
which direction the path should be. No need to go back to the DAI and check the
stream names.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 21:37:17 +01:00
Lars-Peter Clausen
fe83897fc5 ASoC: dapm: Use snd_soc_dapm_add_path() in snd_soc_dapm_new_pcm()
We already know the widgets we want to connect, so use snd_soc_dapm_add_path()
instead of snd_soc_dapm_add_route() in snd_soc_dapm_new_pcm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 21:34:49 +01:00
Lars-Peter Clausen
9887c20b9f ASoC: dapm: Use snd_soc_dapm_add_path() in connect_dai_link_widgets()
We already know which two widgets should be connected, so use
snd_soc_dapm_add_path() instead of snd_soc_dapm_add_route() in
snd_soc_dapm_connect_dai_link_widgets().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 21:34:48 +01:00
Lars-Peter Clausen
a4e9154c42 ASoC: dapm: Revert "ASoC: dapm: Fix double prefix addition"
This reverts commit bd23c5b661.

The patch claims that the patch is necessary to avoid double prefix addition
when calling snd_soc_dapm_add_route() from snd_soc_dapm_connect_dai_link_widgets().
But snd_soc_dapm_add_route() is called with the card's DAPM context, which does
not have a prefix, which means there is no prefix that could be added a second
time.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 21:34:43 +01:00
Lars-Peter Clausen
ca5106ae3d ASoC: dapm: Skip CODEC<->CODEC links in connect_dai_link_widgets()
For CODEC to CODEC DAI links the paths are created in snd_soc_dapm_new_pcm().
Also for CODEC to CODEC links the widgets are connected cross-over via a DAI
link widget, meaning that the capture widget of one CODEC will be connected to
the playback widget of the other and vice versa. Whereas
snd_soc_dapm_connect_dai_link_widgets() directly connects the playback widget of
the CPU DAI to the playback widget of the CODEC DAI and the capture widget of
the CPU DAI to the capture widget of the CODEC DAI. So not skipping
CODEC<->CODEC links in snd_soc_dapm_connect_dai_link_widgets() will create
incorrect connections between the two CODECs which will cause DAPM to detect
active paths where there are none and unnecessarily power up widgets.

Fixes: b893ea5 ("ASoC: sapm: Automatically connect DAI link widgets in DAPM graph.")
Cc: <stable@vger.kernel.org> (for 3.14+)
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 21:33:36 +01:00
Nicolin Chen
868a6ca84e ASoC: pcm: Fix incorrect condition check for case SNDRV_PCM_TRIGGER_SUSPEND
The regular state before we execute SNDRV_PCM_TRIGGER_SUSPEND should be
SNDRV_PCM_TRIGGER_START, not SNDRV_PCM_TRIGGER_STOP. Thus fix it.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 21:16:06 +01:00
Mark Brown
b9d4cf74b9 ASoC: Intel: Build Medfield compressed ops
Since commit 4b68b4e1c5 (ASoC: Intel: split the pcm and compress to
different files) the compressed ops haven't been built causing link
failures on allyesconfig and making the driver unbuildable.  Add the
object to the Makefile to fix that.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by Vinod Koul <vinod.koul@intel.com>
2014-05-09 10:28:42 +01:00
Vinod Koul
0cac6fc3eb ASoC: Intel: rename pcm dias to media dai
this is for further updates to driver which supports DPCM :)

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:25:05 +01:00
Vinod Koul
6f46c0d33e ASoC: Intel: remove unused sst-mfld platform dais
With DPCM we have media dai used and no seperate headset and speaker dai so
remove the speaker dai
The vibra is no longer supported thru audio, so remove

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:25:05 +01:00
Vinod Koul
4b68b4e1c5 ASoC: Intel: split the pcm and compress to different files
For manging them and adding support for more platforms
Code move only

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:25:05 +01:00
Vinod Koul
4496ffab7d ASoC: Intel: mark sst_set_stream_status as non static
as this will be used in compressed split file in subsequent patch

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:25:05 +01:00
Vinod Koul
e11fd7c3ac ASoc: Intel: rename sst-mfld-platform.c
to sst-mfld-platform-pcm.c so that we can split pcm and compress to different
files for upcoming changes to support more platforms

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:25:05 +01:00
Vinod Koul
300f53bf19 ASoC: Intel: remove FSF snail mail address
As this address can move

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:25:05 +01:00
Vinod Koul
2b4c78df05 ASoC: Intel: move component registration blob
to the place near it is used

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:24:54 +01:00
Liam Girdwood
555f8a80c3 ASoC: Intel: Add support to unload/reload firmware modules.
Add some SST API calls to unload and reload firmware modules. This can be used
by PM code to restore state and also allow modular FW to unload and release
memory blocks.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 18:20:58 +01:00
Kuninori Morimoto
29e69fd2cd ASoC: rsnd: remove compatibility code
Now, all platform is using new style rsnd_dai_platform_info.
Keeping compatibility is no longer needed.
We can cleanup code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 12:17:59 +01:00
Kuninori Morimoto
5e392ea0da ASoC: rsnd: remove old clock style support
All platform which used old style was
switched to new style.
R-Car sound can remove old style clock support,
use device dependent clock now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 12:17:59 +01:00
Oder Chiou
71bfa9b4d6 ASoC: rt5645: fix coccinelle warnings
Return statements in functions returning bool should use
true/false instead of 1/0.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 09:02:41 +01:00
Oder Chiou
0f776efd86 ASoC: rt5645: Correct the cache sync function
The patch corrects the cache sync function

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 09:02:41 +01:00
Oder Chiou
4809b96ebb ASoC: rt5645: Move settings from probe() to reg_default struct
The patch moves the private register settings from probe() to reg_default
struct.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 09:02:41 +01:00
Oder Chiou
9e22f7826a ASoC: rt5645: Staticise non-exported symbols
The patch is for staticising non-exported symbols

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 08:00:43 +01:00
Oder Chiou
92e160ddf6 ASoC: rt5645: Remove the unused variable
The patch is for removing the unused variable.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08 08:00:43 +01:00
Takashi Iwai
1c37c22332 ALSA: hda - Add dock pin setups for Thinkpad T440
The headphone and mic jacks on Thinkpad T440 are assigned to pins NID
0x16 and 0x19, respectively.  These need to be set up manually by a
fixup.

Reported-and-tested-by: Joschi Brauchle <joschi.brauchle@tum.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-07 11:40:27 +02:00
Lars-Peter Clausen
db88a8e3ca ASoC: Remove unused num_dai field from CODEC
Commit d191bd8de8 ("ASoC: snd_soc_codec includes snd_soc_component") removed the
last user of the num_dai field. Also remove the field itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07 10:21:26 +01:00
Lars-Peter Clausen
af0881ffbd ASoC: Remove unused 'list' field form card
The global card list was removed in commit b19e6e7b7 ("ASoC: core: Use driver
core probe deferral"). The 'list' field of the snd_soc_card struct has been
unused since then. This patch removes the field.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07 10:21:25 +01:00
Lars-Peter Clausen
24faf76568 ASoC: Remove card's DAI list
Commit f0fba2ad1 ("ASoC: multi-component - ASoC Multi-Component Support") added
a per card list that keeps track of all the DAIs that have been registered with
the card, but the list has never been used. This patch removes it again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07 10:21:25 +01:00
Mark Brown
387f837b3d Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core 2014-05-07 10:21:22 +01:00
Liam Girdwood
2b39aab18a ASoC: Intel: Fix block offset calculations.
Block offset calculations are done in the contiguous allocator so
are not required here.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07 09:38:29 +01:00
Brian Austin
272b5edd3b ASoC: Add support for CS42L56 CODEC
This patch adds support for the Cirrus Logic Low Power Stereo I2C CODEC

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 18:20:22 -07:00
Daniel Mack
7c2fcccc32 ASoC: sta350: add support for bits in miscellaneous registers
Add support for RPDNEN, NSHHPEN, BRIDGOFF, CPWMEN and PNDLSL, and add DT
bindings to access them.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:52:59 -07:00
Liam Girdwood
e9024f0ba3 ASoC: Intel: Fix check for pdata usage before dereference.
This patch fixes the following dereference check ordering.

 sound/soc/intel/sst-haswell-pcm.c:749 hsw_pcm_probe() warn: variable dereferenced before check 'pdata' (see line 746)

 git remote add asoc git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
 git remote update asoc
 git checkout 0b708c87f6
 vim +/pdata +749 sound/soc/intel/sst-haswell-pcm.c

 a4b12990 Mark Brown    2014-03-12  740  };
 a4b12990 Mark Brown    2014-03-12  741
 a4b12990 Mark Brown    2014-03-12  742  static int hsw_pcm_probe(struct snd_soc_platform *platform)
 a4b12990 Mark Brown    2014-03-12  743  {
 a4b12990 Mark Brown    2014-03-12  744  	struct sst_pdata *pdata = dev_get_platdata(platform->dev);
 a4b12990 Mark Brown    2014-03-12  745  	struct hsw_priv_data *priv_data;
 0b708c87 Liam Girdwood 2014-05-02 @746  	struct device *dma_dev = pdata->dma_dev;
 0b708c87 Liam Girdwood 2014-05-02  747  	int i, ret = 0;
 a4b12990 Mark Brown    2014-03-12  748
 a4b12990 Mark Brown    2014-03-12 @749  	if (!pdata)
 a4b12990 Mark Brown    2014-03-12  750  		return -ENODEV;
 a4b12990 Mark Brown    2014-03-12  751
 a4b12990 Mark Brown    2014-03-12  752  	priv_data = devm_kzalloc(platform->dev, sizeof(*priv_data), GFP_KERNEL);

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:42:00 -07:00
Lars-Peter Clausen
c9e065c27f ASoC: dapm: Make sure to always update the DAPM graph in _put_volsw()
When using auto-muted controls it may happen that the register value will not
change when changing a control from enabled to disabled (since the control might
be physically disabled due to the auto-muting). We have to make sure to still
update the DAPM graph and disconnect the mixer input.

Fixes: commit 5729507 ("ASoC: dapm: Implement mixer input auto-disable")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:31:14 -07:00
Lars-Peter Clausen
6b0a0b3b4e ASoC: Make soc_find_matching_codec() static
The function is only used locally, make it static.

Fixes the following warning from sparse:
	sound/soc/soc-core.c:1644:22: warning: symbol 'soc_find_matching_codec' was not declared. Should it be static?

Fixes: 3ca041ed ("ASoC: dt: Allow Aux Codecs to be specified using DT")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-By: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:29:25 -07:00
Nicolin Chen
b8a832a0b6 ASoc: fsl_spdif: Add descriptions for fsl_spdif_priv
Other people would clearly understand each member and improve if they want.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:40 -07:00
Nicolin Chen
527cda78eb ASoC: fsl_spdif: Print actual sample rate for debug
People would simply know what the driver gets the best for the current
sample rate playback.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Nicolin Chen
27c647bff2 ASoC: fsl_spdif: Add sysclk df support to derive txclk from sysclk
The sysclk is one the clock sources that could be selected to derive
tx clock. But the route for sysclk is a bit different that it does
not only contain txclk df divider but also have an extra sysclk df.

So this patch mainly adds syclk df configuration support so as to
let the driver be able to get clock from sysclk.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Nicolin Chen
e41a4a79af ASoC: fsl_spdif: Rename all _div to _df
We should have used _df by following the reference manual at the beginning.
So this patch just renames them.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Mark Brown
af46929e6e Linux 3.15-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTZuYPAAoJEHm+PkMAQRiGC/wIAJhgGkofnbEv4x0QEXJuNQOv
 rXxId3RQpLQ2PGjJHbrYRvwyK9X7L+JREDJGMyKh8VCMHaYQ1safpI6KII+BvkVb
 9FxcledNEB4sDNiShsckG39iBGBAsi2R630XgygLoydfrvNnCrhPB5vi1TbWE37t
 xTsaMJxZncSZ6nMsO8w5klVhSOlBPGUp9cVLZhvKTR66eF4JGX3hZHVPwlpZZd2J
 ExhxmhnwBATuP3IexRyZ/3/J/zGdJJ9e5JLlEwdLo2hKVgqVosDu7teEucLGzZL1
 YdGz7Ndl+Ky9rG/RSuZSCfG7XF5DCroqcDNhT+sqvoTWXU0iunAjFIKavy3CxNA=
 =7moZ
 -----END PGP SIGNATURE-----

Merge tag 'v3.15-rc4' into asoc-fsl-spdif

Linux 3.15-rc4
2014-05-05 12:27:30 -07:00
Nicolin Chen
9c6344b3fa ASoC: fsl_spdif: Use clk_set_rate() for spdif root clock only
The clock mux for the Freescale S/PDIF controller has eight clock sources
while most of them are from other moudles and even system clocks that do
not allow a rate-changing operation.

So we here only allow the clk_set_rate() and clk_round_rate() happened to
spdif root clock, the private clock for S/PDIF controller.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:26:05 -07:00
Anssi Hannula
561a7d6e85 ALSA: hda - hdmi: Set infoframe and channel mapping even without sink
Currently infoframe contents and channel mapping are only set when a
sink (monitor) is present.

However, this does not make much sense, since
1) We can make a very reasonable guess on CA after 18e391862c ("ALSA:
   hda - hdmi: Fallback to ALSA allocation when selecting CA") or by
   relying on a previously valid ELD (or we may be using a
   user-specified channel map).
2) Not setting infoframe contents and channel count simply means they
   are left at a possibly incorrect state - playback is still allowed
   to proceed (with missing or wrongly mapped channels).

Reasons for monitor_present being 0 include disconnected cable, video
driver issues, or codec not being spec-compliant. Note that in
actual disconnected-cable case it should not matter if these settings
are wrong as they will be re-set after jack detection, though.

Change the behavior to allow the infoframe contents and the channel
mapping to be set even without a sink/monitor, either based on the
previous valid ELD contents, if any, or based on sensible defaults
(standard channel layouts or provided custom map, sink type HDMI).

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: Stephan Raue <stephan@openelec.tv>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-05 16:55:34 +02:00
Takashi Iwai
59991da498 Merge branch 'for-linus' into for-next
... for applying the further HDMI fixes.
2014-05-05 16:54:33 +02:00
Anssi Hannula
f06ab794af ALSA: hda - hdmi: Set converter channel count even without sink
Since commit 1df5a06a ("ALSA: hda - hdmi: Fix programmed active channel
count") channel count is no longer being set if monitor_present is 0.
This is because setting the count was moved after the CA value is
determined, which is only after the monitor_present check in
hdmi_setup_audio_infoframe().

Unfortunately, in some cases, such as with a non-spec-compliant codec or
with a problematic video driver, monitor_present is always 0. As a
specific example, this seems to happen with gen1 ATV (SiI1390 codec),
causing left-channel-only stereo playback (multi-channel playback has
apparently never worked with this codec despite it reporting 8 channels,
reason unknown).

Simply setting converter channel count without setting the pin infoframe
and channel mapping as well does not theoretically make much sense as
this will just mean they are out-of-sync and multichannel playback will
have a wrong channel mapping.

However, adding back just setting the converter channel count even in
no-monitor case is the safest change which at least fixes the stereo
playback regression on SiI1390 codec. Do that.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Reported-by: Stephan Raue <stephan@openelec.tv>
Tested-by: Stephan Raue <stephan@openelec.tv>
Cc: <stable@vger.kernel.org> # 3.12+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-05 16:28:10 +02:00
Oder Chiou
1319b2f6a5 ASoC: rt5645: Add codec driver
This patch adds the Realtek ALC5645 codec driver. It is the base
version that because the jack detect function is not implemented to
it, the headphone and AMIC1 are not workable. We will fill up the
further functions later.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-03 10:36:10 -07:00
Vinod Koul
d98812082c ASoC: add SND_SOC_BYTES_EXT
we need _EXT version for SND_SOC_BYTES so that DSPs can use this to pass data
for DSP modules

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 13:44:24 -07:00
Mark Brown
eba17e6868 Merge branch 'topic/input' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-cs42l51
Conflicts:
	sound/soc/codecs/Kconfig
2014-05-02 10:00:35 -07:00
Liam Girdwood
51b4e24f38 ASoC: Intel: Fix stream position pointer.
Read the stream offset and presentation position from DSP memory rather
than using the old estimated position. This fixes timing issues with
pulseaudio.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 09:54:05 -07:00
Liam Girdwood
916152c488 ASoC: Intel: Fix allow hw_params to be called more than once.
hw_params() can be called multiple times. Make sure we release the DSP
stream that was allocated on previous hw_params() calls before allocating
a new DSP stream.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 09:53:02 -07:00
Liam Girdwood
10df350977 ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.
The Intel IOMMU requires that the ACPI device is used to allocate all
DMA memory buffers. This means we need to pass the DMA device pointer into child
component devices that allocate DMA memory.

We also only set the DMA mask for the ACPI device now instead of for each
component device.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 09:53:02 -07:00
Liam Girdwood
0b708c87f6 ASoC: Intel: Fix Haswell/Broadwell DSP page table creation.
Fix page table creation on Haswell and Broadwell to remove unsafe
virt_to_phys mappings and use more portable SG buffer. Use audio buffer
APIs to allocate DMA buffers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 09:53:01 -07:00
Liam Girdwood
84fbdd5861 ASoC: Intel: Fix allocated block list usage when adding blocks.
Make sure we add the allocated blocks to the modules list of blocks.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 09:53:01 -07:00
Liam Girdwood
48695f3d4e ASoC: Intel: Fix block allocation so we only allocate blocks once.
Make sure we dont alloc blocks twice with requests spanning more
than one block.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 09:51:58 -07:00
Brian Austin
c894e394d4 ASoC: Remove IS_ENABLED for INPUT in CS42L52 and WM8962
Now that INPUT is required for the CS42L52 and WM8962 we can remove the
IS_ENABLED(INPUT) check in the drivers.

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02 09:41:09 -07:00
Clemens Ladisch
7040b6d1fe ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data
The TEAC UD-H01 firmware sends wrong feedback frequency values, thus
causing the PC to send the samples at a wrong rate, which results in
clicks and crackles in the output.

Add a workaround to detect and fix the corruption.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
[mick37@gmx.de: use sender->udh01_fb_quirk rather than
 ep->udh01_fb_quirk in snd_usb_handle_sync_urb()]
Reported-and-tested-by: Mick <mick37@gmx.de>
Reported-and-tested-by: Andrea Messa <andr.messa@tiscali.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-02 18:21:55 +02:00
Takashi Iwai
1ee23fe07e ALSA: usb-audio: Fix deadlocks at resuming
The recent addition of the USB audio mixer suspend/resume may lead to
deadlocks when the driver tries to call usb_autopm_get_interface()
recursively, since the function tries to sync with the finish of the
other calls.  For avoiding it, introduce a flag indicating the resume
operation and avoids the recursive usb_autopm_get_interface() calls
during the resume.

Reported-and-tested-by: Bryan Quigley <gquigs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-02 18:17:06 +02:00
Takashi Iwai
1c53e7253e ALSA: usb-audio: Save mixer status only once at suspend
The suspend callback of usb-audio driver may be called multiple times
per suspend when multiple USB interfaces are bound to a single sound
card instance.  In such a case, it's superfluous to save the mixer
values multiple times.  This patch fixes it by checking the counter.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-02 18:14:42 +02:00
Sander Eikelenboom
b7a7723513 ALSA: usb-audio: Prevent printk ratelimiting from spamming kernel log while DEBUG not defined
This (widely used) construction:

if(printk_ratelimit())
	dev_dbg()

Causes the ratelimiting to spam the kernel log with the "callbacks suppressed"
message below, even while the dev_dbg it is supposed to rate limit wouldn't
print anything because DEBUG is not defined for this device.

[  533.803964] retire_playback_urb: 852 callbacks suppressed
[  538.807930] retire_playback_urb: 852 callbacks suppressed
[  543.811897] retire_playback_urb: 852 callbacks suppressed
[  548.815745] retire_playback_urb: 852 callbacks suppressed
[  553.819826] retire_playback_urb: 852 callbacks suppressed

So use dev_dbg_ratelimited() instead of this construction.

Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-02 18:10:59 +02:00
Arnd Bergmann
31ee2bfd72 ASoC: fsl: select SND_SOC_IMX_PCM_DMA where needed
Since commit 204dec93ea "ASoC: fsl: Allow to select individual common
options", it is possible to enable SND_SOC_FSL_SSI and SND_SOC_FSL_SPDIF
manually, either as loadable modules or built-in. This unfortunately
leads to a link error if one or both of them are built-in, while
the imx-pcm-dma framework is a loadable module:

sound/built-in.o: In function `fsl_ssi_probe':
:(.text+0x51fb8): undefined reference to `imx_pcm_dma_init'
sound/built-in.o: In function `fsl_spdif_probe':
:(.text+0x52e20): undefined reference to `imx_pcm_dma_init'

This changes Kconfig to prevent this case by using 'select' to turn
on the imx-pcm-dma code from both drivers. For consistency, we also
turn on the imx-pcm-fiq code, which is an alternative to the dma
implementation.

Note that imx-pcm-fiq is platform dependent, so we must not enable
that unless we are building a kernel for i.MX. Note also the
"if SND_IMX_SOC != n" syntax as opposed to the normal "if SND_IMX_SOC".
This is needed to avoid turning on the options as 'm' if 'SND_IMX_SOC'
is a module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 13:47:28 -07:00
Arnd Bergmann
b7a80379aa ASoC: omap: Amstrad E3 needs TTY support for codec
The cx20442 codec driver used here requires the TTY layer to
be enabled, or we get a link error:

sound/built-in.o: In function `cx20442_codec_remove':
cx20442.c:398: undefined reference to `tty_hangup'
sound/built-in.o: In function `ams_delta_remove':
ams-delta.c:613: undefined reference to `tty_unregister_ldisc'
sound/built-in.o: In function `ams_delta_cx20442_init':
ams-delta.c:559: undefined reference to `tty_register_ldisc'

This adds the missing dependency in the E3 configuration, there
was already one for the codec.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 13:31:05 -07:00
Arnd Bergmann
7b6ad9e85b ASoC: sh: Migo-R sound needs I2C
The WM8978 driver needs I2C to be enabled, so the
SND_SIU_MIGOR option also requires this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 13:29:54 -07:00
Arnd Bergmann
7ec91cd017 ASoC: samsung: TLV320AIC23 and Simtec Hermes audio need I2C
This codec requires I2C to be enabled, so any other option
that selects it should also depend on I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 13:28:26 -07:00
Arnd Bergmann
a4519ecbd0 ASoC: atmel: Atmel WM8904 codec support needs I2C
The WM8904 codec driver needs I2C to be enabled, so the
SND_ATMEL_SOC_WM8904 option also requires this.

Found using randconfig build testing.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 12:09:21 -07:00
Xiubo Li
40e3b934be ASoC: fsl: Allow to select ESAI device individually
This will be useful for out-of-tree drivers since in-tree drivers
could select it automatically.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 11:09:05 -07:00
Xiubo Li
b71fc4e6c9 ASoC: fsl: Allow to select SAI device individually
This will be useful for out-of-tree drivers since in-tree drivers
could select it automatically.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 11:08:29 -07:00
Arnd Bergmann
482b91c7f1 ASoC: pxa: TTC DKB audio needs I2C
The missing dependency can lead to build errors, so
make it explicit in Kconfig.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 11:00:34 -07:00
Arnd Bergmann
654da9f522 ASoC: samsung: UDA1380 needs I2C
The UDA1380 driver needs I2C to be enabled, so
SND_SOC_SAMSUNG_H1940_UDA1380 and
SND_SOC_SAMSUNG_RX1950_UDA1380 also
require this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:59:40 -07:00
Arnd Bergmann
36a26e1a9a ASoC: omap: RX-51 audio needs I2C
The codec requires I2C to be enabled, so any other option
that selects it should also depend on I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:59:03 -07:00
Sebastian Reichel
d052a3d6a7 ASoC: omap: rx51: Add DT support
This patch adds device tree support to the Nokia N900 audio driver and
adds documentation for the DT binding.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:57:34 -07:00
Mark Brown
f29b542183 Merge branch 'asoc-dt' into asoc-omap 2014-05-01 10:57:03 -07:00
Sebastian Reichel
3ca041ed04 ASoC: dt: Allow Aux Codecs to be specified using DT
This patch adds support for specifying auxiliary codecs and
codec configuration via device tree phandles.

This change adds new fields to snd_soc_aux_dev and snd_soc_codec_conf
and adds support for the changes to SoC core methods.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:56:45 -07:00
Sebastian Reichel
0265e1ae64 ASoC: omap: rx51: Add some error messages
Add more error messages making it easier to identify problems.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:54:35 -07:00
Sebastian Reichel
386e81ab3b ASoC: omap: rx51: get GPIO numbers via gpiod API
Update the driver to get GPIO numbers from the
devm gpiod API instead of requesting hardcoded
GPIO numbers.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:54:34 -07:00
Sebastian Reichel
0a17a37046 ASoC: omap: rx51: omap_mcbsp_st_add_controls: add id parameter
This is a preparation for DT based booting where the McBSP id
is set to -1 for all McBSP instances.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 10:54:34 -07:00
Fabio Estevam
a0b148b423 ASoC: wm8985: Use devm_regulator_bulk_get()
Using devm_regulator_bulk_get() can make the code cleaner and smaller as we
do not need to call regulator_bulk_free() in the error and remove paths.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:36:06 -07:00
Arnd Bergmann
49e3c6418b ASoC: nuc900: export nuc900_ac97_data
The symbol "nuc900_ac97_data" is used by the nuc900_pcm driver,
which may be a loadable module, so we should export it.

If one tries to build SND_SOC_NUC900 without SND_SOC_NUC900_AC97,
the kernel fails to link because of the reference to nuc900_ac97_data.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:32:20 -07:00
Arnd Bergmann
1aa91b6dd4 ASoC: samsung-idma: avoid 64-bit division
dma_addr_t may be 64 bit wide, which causes a build failure
when doing a division on it. Here it is safe to cast to an
u32 type, which avoids the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Tested-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:31:13 -07:00
Arnd Bergmann
01c2cb67ea ASoC: samsung: SMDK_WM8580_PCM needs REGMAP_I2C
This adds a missing dependency for SND_SOC_SMDK_WM8580_PCM to
require REGMAP_I2C to be enabled, avoiding possible build
erorrs.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:30:43 -07:00
Arnd Bergmann
24fc81d5fe ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3X
This codec requires I2C to be enabled, so any other option
that selects it should also depend on I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:29:39 -07:00
Arnd Bergmann
a2915d4fef ASoC: CS42L51 and WM8962 codecs depend on INPUT
Building ARM randconfig got into a situation where CONFIG_INPUT
is turned off and SND_SOC_ALL_CODECS is turned on, which failed
for two codecs trying to use the input subsystem. Some other
drivers also select one of these codecs and consequently need an
explicit dependency added.

Appending to the dependency list seems the easiest way out,
since this is not a practical limitation. If anyone really
needs to build these codecs for a kernel with no input support,
a more sophisticated solution can be implemented.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 18:29:33 -07:00
Arnd Bergmann
a8784dd0f4 ASoC: cq93vc: fix cq93vc_get_regmap build error
49101a25ac "ASoC: cq93vc: Remove the set_cache_io() entirely from
ASoC probe" introduced the cq93vc_get_regmap function that has an
obvious build error referring to the 'codec' variable that is not
declared anywhere"

sound/soc/codecs/cq93vc.c: In function 'cq93vc_get_regmap':
sound/soc/codecs/cq93vc.c:157:34: error: 'codec' undeclared (first use in this function)
  struct davinci_vc *davinci_vc = codec->dev->platform_data;
                                  ^

This changes the code to compile again, presumably in the way it was
intended. Not tested.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 18:23:49 -07:00
Bard Liao
4eefa0d850 ASoC: rt5640: correct 5640's device ID
This patch correct rt5640's device ID

Signed-off-by: Bard Liao <bardliao@realtek.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 11:25:19 -07:00
Hui Wang
91943954e3 ALSA: hda - add headset mic detect quirk for a Dell laptop
When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
SID: 0x1028067e), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

BugLink: https://bugs.launchpad.net/bugs/1297581
Cc: David Henningsson <david.henningsson@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-04-30 12:36:48 +02:00
Alexander Shiyan
780aaeff96 ASoC: mc13783: Add devicetree support
This patch adds devicetree support for mc13783-codec.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 15:24:54 -07:00
Sebastian Reichel
a7d5202855 ASoC: omap: rx51: Use devm_snd_soc_register_card
This patch converts the rx51 ASoC module to use
devm_snd_soc_register_card.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 15:22:15 -07:00
Sebastian Reichel
beab3da155 ASoC: omap: rx51: Add module alias
Add module alias to support driver autoloading.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 15:22:15 -07:00
Sebastian Reichel
441dc45aa2 ASoC: omap: rx51: Use static const char * const arrays
Mark the array and the string const by using "static const char * const
foo[]" instead of "static const char* foo[]".

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 15:22:14 -07:00
Tushar Behera
31c26a6a84 ASoC: samsung: Add sound card driver for Snow board
Added machine driver to instantiate I2S based sound card on Snow
board. It has MAX98095 audio codec on board.

There are some other variants for Snow board which have MAX98090
audio codec. Hence support for MAX98090 is also added to this
driver.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 12:09:38 -07:00
Nicolin Chen
0b8643900a ASoC: fsl_spdif: Fix clock source for rxclk rate measurement
The rxclk rate actually uses sysclk, ipg clock for example, as its
reference clock to calculate it. But the driver currently doesn't
pass a correct clock source. So fix it.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 12:07:17 -07:00
Jarkko Nikula
4792b0dbcf ASoC: core: Add support for machine specific trigger callback
Machine specific trigger callback allows to do final stream start/stop
related operations in a machine driver after setting up the codec, DMA and
DAI.

One example could be clock management for linked streams case where machine
driver can start/stop synchronously the linked streams.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 12:04:32 -07:00
Jarkko Nikula
4da533932d ASoC: core: Fix component_list corruption when unloading modules
This fixes module unload regressions introduced by commits 98e639fb8a
("ASoC: Track which components have been registered with
snd_soc_register_component()") and b37f1d123c ("ASoC: Let snd_soc_platform
subclass snd_soc_component").

First commit causes component_list to be corrupted when removing codec and
second when removing platform. Reason for both is that components associated
with platform or codec are never removed from the list because for them
registered_as_component field in struct snd_soc_component is always false.

Now list becomes corrupted when snd_soc_unregister_platform() or
snd_soc_unregister_codec() frees the platform or codec structure and where
the associated struct snd_soc_component is embedded.

Fix these by moving component unregistration and cleanup to a new local
function __snd_soc_unregister_component() that takes component as its
argument.

Since component is known for platforms and codecs the
__snd_soc_unregister_component() can be called directly and
snd_soc_unregister_component() takes care to find and unregister only
components that were registered using snd_soc_register_component().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 10:09:11 -07:00
Mark Brown
00a41d9fe2 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dapm 2014-04-29 09:49:49 -07:00
Takashi Iwai
6ba736dd02 ALSA: hda - Suppress CORBRP clear on Nvidia controller chips
The recent commit (ca460f8652) changed the CORB RP reset procedure to
follow the specification with a couple of sanity checks.
Unfortunately, Nvidia controller chips seem not following this way,
and spew the warning messages like:
  snd_hda_intel 0000:00:10.1: CORB reset timeout#1, CORBRP = 0

This patch adds the workaround for such chips.  It just skips the new
reset procedure for the known broken chips.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-29 18:41:22 +02:00
Lars-Peter Clausen
c471fdd1b6 ASoC: dapm: Factor out duplicated code in soc_dapm_stream_event()
In soc_dapm_stream_event() we have the same code twice, once for the codec_dai
and once for the cpu_dai.  This patch factors the duplicated code out into a
separate function. This will make it easier to modify the implementation (since
there is only one place that needs to be updated) and also easier to add support
for more than two DAIs per DAI link.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 09:40:51 -07:00
Andy Shevchenko
02fd1a76bf ALSA: fm801: introduce fm801_ac97_is_ready()/fm801_ac97_is_valid() helpers
The introduced functios check AC97 if it's ready for communication and
read data is valid.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-29 16:30:15 +02:00
Andy Shevchenko
215dacc281 ALSA: fm801: introduce macros to access the hardware
It will help to maintain HW accessors and, for example, switch from the
direct I/O to MMIO which is more convenient for PCI devices.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-29 16:29:57 +02:00
Masanari Iida
af831eef4c ALSA: usb-audio: Fix format string mismatch in mixer.c
Fix format string mismatch in parse_audio_selector_unit().

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-28 12:19:13 +02:00
Masanari Iida
53403a8013 ALSA: core: Fix format string mismatch in seq_midi.c
Fix format string mismatch in snd_seq_midisynth_register_port().
Argument type of p is unsigned int.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-28 12:18:47 +02:00
Kailang Yang
a22aa26f75 ALSA: hda/realtek - Add new codec ALC293/ALC3235 UAJ supported
New codec ALC293/ALC3235 support multifunction jacks.
It used for menual select the input device.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-28 12:17:53 +02:00
Kailang Yang
193177de4f ALSA: hda/realtek - Add two codecs alias name for Dell
Add ALC3235 ALC3263.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-28 12:17:50 +02:00
Hui Wang
e32dfbed8c ALSA: hda - add headset mic detect quirk for a Dell laptop
When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
SID: 0x10280674), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

BugLink: https://bugs.launchpad.net/bugs/1297581
Cc: David Henningsson <david.henningsson@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-04-28 12:15:02 +02:00
Oder Chiou
33fcec2920 ASoC: rt5640: Add the rt5639 support to the OF match table
The patch adds the rt5639 support to the OF match table.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-28 10:08:09 +01:00
Lars-Peter Clausen
7b4a469e58 ASoC: Remove name_prefix unset during DAI link init hack again
This was initially removed in commit 6479f15ad ("ASoC: Remove name_prefix unset
during DAI link init hack"), but was brought back in commit 503ae5e0 ("ASoC:
core: Add helpers for dai link and aux dev init") by accident. This patch
removes it again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-26 17:55:33 +01:00
Fabio Estevam
e90c7b456b ASoC: wm8955: Use devm_regulator_bulk_get()
Using devm_regulator_bulk_get() can make the code cleaner and smaller as we
do not need to call regulator_bulk_free() in the error and remove paths.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-25 12:24:26 +01:00
Fabio Estevam
3598aad547 ASoC: wm8731: Use devm_regulator_bulk_get()
Using devm_regulator_bulk_get() can make the code cleaner and smaller as we
do not need to call regulator_bulk_free() in the error and remove paths.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-25 12:17:18 +01:00
Fabio Estevam
a3086791eb ASoC: wm8804: Use devm_regulator_bulk_get()
Using devm_regulator_bulk_get() can make the code cleaner and smaller as we
do not need to call regulator_bulk_free() in the error and remove paths.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-25 12:17:00 +01:00
Fabio Estevam
e9382e3b7a ASoC: tlv320dac33: Use devm_regulator_bulk_get()
Using devm_regulator_bulk_get() can make the code cleaner and smaller as we
do not need to call regulator_bulk_free() in the error and remove paths.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-25 12:16:03 +01:00
Joe Perches
2a1c23e339 ASoC: tlv320aic31xx: Convert /n to \n
Use a newline character appropriately.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-25 12:14:46 +01:00
Fabio Estevam
63e54cd9ca ASoC: sgtl5000: Use devm_regulator_bulk_get()
Using devm_regulator_bulk_get() can make the code cleaner and smaller as we
do not need to call regulator_bulk_free() in the error and remove paths.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 18:32:40 +01:00
Benoit Cousson
3701861060 ASoC: core: Add one dai_get_widget helper instead of two rtd based ones
Replace rtd_get_codec_widget() and rtd_get_cpu_widget() by a simple
dai_get_widget() in preparation for DAI-multicodec support, per Lars
suggestion.

No functional change.

Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:25:16 +01:00
Misael Lopez Cruz
503ae5e036 ASoC: core: Add helpers for dai link and aux dev init
Separate DAI link and aux dev initialization in preparation for
DAI multicodec support.
Since aux dev will remain using single codecs but DAI links
will be able to support multiple codecs.

No functional change.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
[fparent@baylibre.com: Adapt to 3.14+]
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:24:03 +01:00
Nicolin Chen
781cbebed7 ASoC: simple-card: Improve coding style
Improve indentation and space.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:20:11 +01:00
Nicolin Chen
966b806360 ASoC: simple-card: Simplify error msg in simple_card_dai_link_of()
It would look better to use prop instead.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:20:11 +01:00
Nicolin Chen
50e6c718a1 ASoC: simple-card: Drop node->name checking
The current simple-card driver limits the DT node name to "sound".
Any of other names is forbidden while actually we should allow DT
to pass other node names.

And if this function is being called, the node must already have
the compatible "simple-audio-card" in DTB. So there should be no
need to check the name here.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:20:11 +01:00
Nicolin Chen
e9ffb5ba4d ASoC: fsl: Drop formats limitation for imx-pcm-dma.c
Now ASoC core is getting the intersection of supported formats not only
from CPU and CODEC dai's but also from DMA's. However, there should be
no specific width limitation from SDMA side.

So drop it. Otherwise, we would only support S16_LE format for all i.MX
platforms.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:14:26 +01:00
Nicolin Chen
08f7336e64 ASoC: fsl_spdif: Add core clock control for DMA access
Regmap is able to enable/disable the core clock automatically each time
it's going to access the registers. But for DMA cases during playback or
recording, it's totally beyong control of regmap. So we have to open the
clock manually.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:11:16 +01:00
Jarkko Nikula
de30a2ccb2 ASoC: Intel: Cancel hsw_notification_work before freeing the stream
I suppose there is a possibility that hsw_notification_work() may run after
sst_hsw_stream_free() which can lead to a kernel crash since struct
sst_hsw_stream is freed at that point and
stream = container_of(work, struct sst_hsw_stream, notify_work) is not valid
when hsw_notification_work() is run.

Reported-by: Derek Basehore <dbasehore@chromium.org>
Reported-by: Wenkai Du <wenkai.du@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 11:32:23 +01:00
Lars-Peter Clausen
b8909783a2 ASoC: imx-audmux: Fix section mismatch
audmux_debugfs_init() is marked as __init, but is called from imx_audmux_probe()
which is not marked as __init. This creates a section mismatch and a potential
runtime crash (if imx_audmux_probe() is called after the .init section was
dropped). This patch removes the __init annotation from audmux_debugfs_init(),
which fixes the following warning:
	WARNING: sound/soc/built-in.o(.text+0x86960): Section mismatch in reference
	from the function imx_audmux_probe() to the function
	.init.text:audmux_debugfs_init()

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 11:22:53 +01:00
Nicolin Chen
3dcba280f7 ASoC: core: Don't break component searching if both id and num_dai are 0
The commit e41975ed (ASoC: core: Fix the DAI name getting) added a break
within the "if (id < 0 || id >= pos->num_dai)" while the original design
of the search didn't break the loop if that condition contented but only
mark the ret error and let it go on to search the next component.

In a case like dmaengine which's not a dai but as a component sharing an
identical name with a dai, both the id and pos->num_dai here could be 0.
If we break the search, we may never find the dai we want as it might be
placed behind its dmaengine in the component list.

So this patch fixes the issue above by following the original design to
let the search carry on.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 13:49:15 +01:00
Daniel Mack
b38d10ed60 ASoC: ak4104: add regulator consumer support
The AK4104 has only one power supply, called VDD. Enable it as long as
the codec is in use.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 13:20:07 +01:00
Jyri Sarha
b3ca11ff59 ASoC: simple-card: Move dai-link level properties away from dai subnodes
The properties like format, bitclock-master, frame-master,
bitclock-inversion, and frame-inversion should be common to the dais
connected with a dai-link. For bitclock-master and frame-master
properties to be unambiguous they need to indicate the mastering dai
node with a phandle.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 13:14:27 +01:00
Jyri Sarha
389cb8348c ASoC: core: Update snd_soc_of_parse_daifmt() interface
Adds struct device_node **bitclkmaster and struct device_node **framemaster
function parameters. With the new syntax bitclock-master and frame-master
properties can explicitly indicate the dai-link bit-clock and frame masters
with a phandle. This patch also makes the minimal changes to simple-card
for it to work with the updated snd_soc_of_parse_daifmt(). Simple-card appears
to be the only user of snd_soc_of_parse_daifmt() for now.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 13:14:27 +01:00
Tushar Behera
d66eac3e2b ASoC: samsung: Don't clear clock setting during i2s_startup
In exiting kernel, if DAIFMT flags are set in dai_link and I2S is
set to run in master mode, the I2S clocks are not getting configured
resulting in no output.

Existing code clears the current I2S clock settings during i2s_startup
and requires that the clocks are reconfigured. It then assumes that
sound-card driver would call snd_soc_dai_{set_sysclk/set_fmt} to
configure the root clock.

1. Since I2S clock settings remain fixed for a board, it would be better
to set the clocks once during sound-card probe.

2. Also if the DAIFMT flags are set in dai_link, snd_soc_dai_set_fmt is
called during DAI probe.

If both these conditions are true, then I2S clock remains unconfigured
during audio playback. Fix this by removing the code to clear
rclk_srcrate in i2s_startup. Instead, reset this during DAI probe.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 12:30:12 +01:00
Lars-Peter Clausen
0aa2a15a7b ASoC: jz4740: Improve build test coverage
Allow the jz4740 audio drivers to be build when CONFIG_COMPILE_TEST is selected.
This should improve the build test coverage. There is one small piece of
platform dependent code in the jz4740-i2s driver. It uses the DMA request type
constants which are defined in a platform specific header. We can solve this by
moving them from the platform specific header to the I2S driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 12:18:44 +01:00
Lars-Peter Clausen
218e18a372 ASoC: qi_lb60: Use GPIO descriptor API
The new GPIO descriptor API is now the preferred way for handling GPIOs. It also
allows us to separate the platform depended code from the platform independent
code (Which will make it possible to increase build test coverage of the
platform independent code).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 12:18:36 +01:00
Kuninori Morimoto
836b31fe1a ASoC: rsnd: call rsnd_dai_pointer_update() from outside of lock
rsnd_soc_dai_trigger() will be called
after rsnd_dai_pointer_update() function
which is using rsnd_lock().
Thus, it should be called from outside of rsnd_lock().
Kernel will be hangup without this patch.
Special thanks to Kataoka-san

Reported-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 12:17:12 +01:00
Wenkai Du
d132cb0a16 ASoC: Intel: Fix audio crash due to race condition in stream deletion
There is a race between sst_byt_stream_free() and sst_byt_get_stream()
if sst_byt_get_stream() called from sst_byt_irq_thread() context is
accessing the byt->stream_list while a stream is deleted from the list.

A stream is added to byt->stream_list in sst_byt_stream_new() and deleted in
sst_byt_stream_free(). sst_byt_get_stream() is always protected by
sst->spinlock, but the stream addition and deletion are not protected.

The patch adds spinlock to both stream addition and deletion.

[Jarkko: Same fix added to sst-haswell-ipc.c too]

Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 12:11:20 +01:00
Tushar Behera
c4839c87f5 ASoC: max98095: Add an explicit of_match_table
Create an explicit of_match_table entry for MAX98095 codec. Also
add a binding Documentation for this compatible string.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23 11:37:27 +01:00
Mark Brown
98810a6dcf Merge remote-tracking branches 'asoc/fix/intel', 'asoc/fix/jz4740', 'asoc/fix/rcar', 'asoc/fix/tlv320aic31xx' and 'asoc/fix/tlv320aic3x' into asoc-linus 2014-04-22 22:01:07 +01:00
Mark Brown
22e0c14280 Merge remote-tracking branches 'asoc/fix/alc5623', 'asoc/fix/cs42l52', 'asoc/fix/cs42l73' and 'asoc/fix/fsl-spdif' into asoc-linus 2014-04-22 22:01:05 +01:00
Mark Brown
31835046be Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2014-04-22 22:01:04 +01:00
Lars-Peter Clausen
1f23380b80 ASoC: Export devm_snd_soc_register_platform()
devm_snd_soc_register_platform() is used in drivers which can be build as
modules, so it needs to be exported to avoid linkers errors like:

	ERROR: "devm_snd_soc_register_platform" [sound/soc/omap/snd-soc-omap.ko] undefined!
	ERROR: "devm_snd_soc_register_platform" [sound/soc/davinci/snd-soc-davinci.ko] undefined!

Fixes: 8931bf620 ("ASoC: Add resource managed snd_soc_register_platform()")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 22:00:42 +01:00
Lars-Peter Clausen
050f62e4de ASoC: qi_lb60: Use devm_snd_soc_register_card()
Makes the code a bit shorter and will also allow us to remove the drivers
remove() callback eventually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 21:53:21 +01:00
Lars-Peter Clausen
0e746d7b2b ASoC: qi_lb60: Set .dai_fmt instead of calling snd_soc_set_dai_fmt()
Rather than calling snd_soc_set_dai_fmt(), just set the dai_fmt field in the
dai_link struct. Both have the same effect, but the later is a bit shorter and
also allows us to remove the now unused init callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 21:53:21 +01:00
Lars-Peter Clausen
b8fb837b0c ASoC: qi_lb60: Set fully_routed flag
The routes for this sound card are fully specified, so set the fully_routed
flag. This allows us to remove the manual snd_soc_dapm_nc_pin() calls.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 21:53:21 +01:00
Lars-Peter Clausen
eebdec044e ASoC: jz4740: Remove Makefile entry for removed file
Commit 0406a40a0 ("ASoC: jz4740: Use the generic dmaengine PCM driver")
jz4740-pcm.c file, but neglected to remove the Makefile entries.

Fixes: 0406a40a0 ("ASoC: jz4740: Use the generic dmaengine PCM driver")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 21:51:58 +01:00
Wenkai Du
95e9ee92e2 ASoC: Intel: Fix audio crash due to negative address offset
There were occasional ADSP crash during reboot testing:

[   11.883364] BUG: unable to handle kernel paging request at ffffc90121700000
[   11.883380] IP: [<ffffffffc024d8bc>] sst_module_insert_fixed_block+0x24f/0x26d [snd_soc_sst_dsp]
[   11.883397] PGD 7800b067 PUD 0
[   11.883405] Oops: 0002 [#1] SMP
[   11.886418] gsmi: Log Shutdown Reason 0x03

The virtual address, ffffc90121700000, was out of range. The virtual
address is calculated by adding LPE base address with an offset:

sst_memcpy32(dsp->addr.lpe + data->offset, data->data, data->size);

The offset is calculated in sst_byt_parse_module, by subtraction of
two virtual addresses dsp->addr.fw_ext and dsp->addr.lpe:

block_data.offset = block->ram_offset + (dsp->addr.fw_ext - dsp->addr.lpe);

These virtual addresses are assigned by kernel from ioremap:

sst->addr.lpe = ioremap(pdata->lpe_base, pdata->lpe_size);
sst->addr.fw_ext = ioremap(pdata->fw_base, pdata->fw_size);

In current driver code, offset is defined as unsigned int32:

struct sst_module_data {
...
	u32 offset;		/* offset in FW file */
};

Most of the time kernel assigned virtual addresses with addr.fw_ext
greater than addr.lpe. But sometimes it was the other way round.

Fix the problem by declaring offset as signed int32_t.

Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 19:22:53 +01:00
Lars-Peter Clausen
907fe36a2c ASoC: Move standard kcontrol helpers to the component level
After moving the IO layer inside ASoC to the component level we can now easily
move the standard control helpers also to the component level. This allows to
reuse the same standard helper control implementations for other components.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 13:38:21 +01:00
Mark Brown
9f68730dc8 Merge branch 'topic/multicodec' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-component 2014-04-22 13:38:14 +01:00
Lars-Peter Clausen
111c0cf566 ASoC: Remove ASoC level IO tracing
The ASoC framework is in the process of migrating all IO operations to regmap.
regmap has its own more sophisticated tracing infrastructure for IO operations,
which means that the ASoC level IO tracing becomes redundant, hence this patch
removes them. There are still a handful of ASoC drivers left that do not use
regmap yet, but hopefully the removal of the ASoC IO tracing will be an
additional incentive to switch to regmap.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 13:24:24 +01:00
Lars-Peter Clausen
23d5442be9 ASoC: dapm: Rename soc_widget_update_bits_locked() to soc_widget_update_bits()
There is no unlocked version of soc_widget_update_bits_locked() and there is no
plan to introduce it in the near future, so drop the _locked suffix.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-22 13:24:24 +01:00