summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 10:45:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 10:45:39 -0700
commitc488eef8154b36cce905624577183dc1fa8f6da0 (patch)
treee66d9e71e09d7213f9a35685283a5a65d11adfd1 /sound/soc
parentcf9c1b92ae62ce71a8e861f02476724348defc6a (diff)
parent3f67f6693c82f1cb8edb233f9bd10fa06d27a193 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Make jack-plug notification selectable ALSA: ctxfi - Add PM support sound: seq_midi_event: fix decoding of (N)RPN events ALSA: hda - Add digital-mic support to ALC262 auto model ALSA: hda - Fix check of input source type for realtek codecs ALSA: hda - Add quirk for Sony VAIO Z21MN ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model ALSA: hda - Fix unsigned comparison in patch_sigmatel.c ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait sound: fix check for return value in snd_pcm_hw_refine ALSA: ctxfi - Allow unknown PCI SSIDs ASoC: Blackfin: update the bf5xx_i2s_resume parameters ASoC: Blackfin: keep better track of SPORT configuration state
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 964824419678..af06904bab0f 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -50,6 +50,7 @@ struct bf5xx_i2s_port {
u16 tcr2;
u16 rcr2;
int counter;
+ int configured;
};
static struct bf5xx_i2s_port bf5xx_i2s;
@@ -168,7 +169,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
break;
}
- if (bf5xx_i2s.counter == 1) {
+ if (!bf5xx_i2s.configured) {
/*
* TX and RX are not independent,they are enabled at the
* same time, even if only one side is running. So, we
@@ -177,6 +178,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
*
* CPU DAI:slave mode.
*/
+ bf5xx_i2s.configured = 1;
ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1,
bf5xx_i2s.rcr2, 0, 0);
if (ret) {
@@ -200,6 +202,9 @@ static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream,
{
pr_debug("%s enter\n", __func__);
bf5xx_i2s.counter--;
+ /* No active stream, SPORT is allowed to be configured again. */
+ if (!bf5xx_i2s.counter)
+ bf5xx_i2s.configured = 0;
}
static int bf5xx_i2s_probe(struct platform_device *pdev,
@@ -244,8 +249,7 @@ static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)
return 0;
}
-static int bf5xx_i2s_resume(struct platform_device *pdev,
- struct snd_soc_dai *dai)
+static int bf5xx_i2s_resume(struct snd_soc_dai *dai)
{
int ret;
struct sport_device *sport =