aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMisael Lopez Cruz <misael.lopez@ti.com>2011-10-24 00:29:41 -0500
committerSimon Wilson <simonwilson@google.com>2011-11-04 13:14:49 -0700
commitcacda80eca1fa8c5ec65b8c66a1228e4c476ec6a (patch)
tree5a004b5bc78fad660ef4516ac0115d8e8694cda7 /sound/soc
parent6e5a3d62ce7cc163196d8b73fa3f8e031f7323b2 (diff)
downloadkernel_samsung_tuna-cacda80eca1fa8c5ec65b8c66a1228e4c476ec6a.zip
kernel_samsung_tuna-cacda80eca1fa8c5ec65b8c66a1228e4c476ec6a.tar.gz
kernel_samsung_tuna-cacda80eca1fa8c5ec65b8c66a1228e4c476ec6a.tar.bz2
ASoC: omap-mcasp: Remove wrappers for start/stop
OMAP McASP module only supports playback, so there is no need to have an additional wrapper on start and stop transmit. Change-Id: Id967ac420d43dae47c3a523c551fd59dd6e8266c Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/omap/omap-mcasp.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/sound/soc/omap/omap-mcasp.c b/sound/soc/omap/omap-mcasp.c
index 6672a81..d5f131b 100644
--- a/sound/soc/omap/omap-mcasp.c
+++ b/sound/soc/omap/omap-mcasp.c
@@ -343,7 +343,7 @@ static int mcasp_compute_clock_dividers(long fclk_rate, int tgt_sample_rate,
return (*out_div_hi <= 4096) ? 0 : -EINVAL;
}
-static int mcasp_start_tx(struct omap_mcasp *mcasp)
+static int omap_mcasp_start(struct omap_mcasp *mcasp)
{
int i;
mcasp_set_ctl_reg(mcasp->base + OMAP_MCASP_GBLCTL_REG, TXHCLKRST);
@@ -374,27 +374,13 @@ static int mcasp_start_tx(struct omap_mcasp *mcasp)
return 0;
}
-static int omap_mcasp_start(struct omap_mcasp *mcasp, int stream)
-{
- if (stream == SNDRV_PCM_STREAM_PLAYBACK)
- return mcasp_start_tx(mcasp);
-
- return -EINVAL;
-}
-
-static void mcasp_stop_tx(struct omap_mcasp *mcasp)
+static void omap_mcasp_stop(struct omap_mcasp *mcasp)
{
mcasp_set_reg(mcasp->base + OMAP_MCASP_GBLCTL_REG, 0);
mcasp_set_reg(mcasp->base + OMAP_MCASP_TXSTAT_REG,
OMAP_MCASP_TXSTAT_MASK);
}
-static void omap_mcasp_stop(struct omap_mcasp *mcasp, int stream)
-{
- if (stream == SNDRV_PCM_STREAM_PLAYBACK)
- mcasp_stop_tx(mcasp);
-}
-
static int omap_mcasp_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
@@ -539,7 +525,7 @@ static int omap_mcasp_hw_params(struct snd_pcm_substream *substream,
struct omap_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
int stream = substream->stream;
- mcasp_stop_tx(mcasp);
+ omap_mcasp_stop(mcasp);
if (omap_hw_dit_param(mcasp, params_rate(params)) < 0)
return -EPERM;
@@ -560,13 +546,13 @@ static int omap_mcasp_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- ret = omap_mcasp_start(mcasp, substream->stream);
+ ret = omap_mcasp_start(mcasp);
break;
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- omap_mcasp_stop(mcasp, substream->stream);
+ omap_mcasp_stop(mcasp);
break;
default: