Merge branch 'for-2.6.31' into for-2.6.32
This commit is contained in:
@ -183,21 +183,21 @@ static int omap_mcbsp_dai_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
|
||||
struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data);
|
||||
int err = 0;
|
||||
int err = 0, play = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
|
||||
|
||||
switch (cmd) {
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
case SNDRV_PCM_TRIGGER_RESUME:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
if (!mcbsp_data->active++)
|
||||
omap_mcbsp_start(mcbsp_data->bus_id);
|
||||
mcbsp_data->active++;
|
||||
omap_mcbsp_start(mcbsp_data->bus_id, play, !play);
|
||||
break;
|
||||
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
if (!--mcbsp_data->active)
|
||||
omap_mcbsp_stop(mcbsp_data->bus_id);
|
||||
omap_mcbsp_stop(mcbsp_data->bus_id, play, !play);
|
||||
mcbsp_data->active--;
|
||||
break;
|
||||
default:
|
||||
err = -EINVAL;
|
||||
|
Reference in New Issue
Block a user