diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2018-11-08 08:29:56 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-13 18:50:14 +0100 |
commit | 59d177f65f50df07f5f0b461c968d2fab7597af1 (patch) | |
tree | 2c4dc77959b660f643b367bc4ac9cfd3ceb28800 /sound/soc/omap/mcbsp.c | |
parent | ASoC: omap-mcbsp: Clean up the interrupt handlers (diff) | |
download | linux-59d177f65f50df07f5f0b461c968d2fab7597af1.tar.xz linux-59d177f65f50df07f5f0b461c968d2fab7597af1.zip |
ASoC: omap-mcbsp: Simplify the mcbsp_start/_stop function parameters
We either start/stop TX or RX, never both. Move the tx/rx direction
selection within the functions.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/omap/mcbsp.c')
-rw-r--r-- | sound/soc/omap/mcbsp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index fca0b0e9186b..7ff22561f00f 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@ -637,8 +637,10 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp) * If no transmitter or receiver is active prior calling, then sample-rate * generator and frame sync are started. */ -void omap_mcbsp_start(struct omap_mcbsp *mcbsp, int tx, int rx) +void omap_mcbsp_start(struct omap_mcbsp *mcbsp, int stream) { + int tx = (stream == SNDRV_PCM_STREAM_PLAYBACK); + int rx = !tx; int enable_srg = 0; u16 w; @@ -694,8 +696,10 @@ void omap_mcbsp_start(struct omap_mcbsp *mcbsp, int tx, int rx) omap_mcbsp_dump_reg(mcbsp); } -void omap_mcbsp_stop(struct omap_mcbsp *mcbsp, int tx, int rx) +void omap_mcbsp_stop(struct omap_mcbsp *mcbsp, int stream) { + int tx = (stream == SNDRV_PCM_STREAM_PLAYBACK); + int rx = !tx; int idle; u16 w; |