aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-audio.c
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2009-02-07 23:38:10 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:44 -0400
commit22cff7b381eca256d2afb460b3b9815f83810011 (patch)
tree7841a27d3f20511680f55ec9f40349baeea0386f /drivers/media/video/em28xx/em28xx-audio.c
parent5c030de4757f64246897babcaa7091b4b391a660 (diff)
V4L/DVB (10523): em28xx-audio: Add macros EM28XX_START_AUDIO / EM28XX_STOP_AUDIO
Added macros EM28XX_START_AUDIO and EM28XX_STOP_AUDIO for em28xx_cmd(). Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-audio.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index 05d145f78b6e..abbf9ee0d39a 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -224,10 +224,10 @@ static int em28xx_cmd(struct em28xx *dev, int cmd, int arg)
224 224
225 switch (cmd) { 225 switch (cmd) {
226 case EM28XX_CAPTURE_STREAM_EN: 226 case EM28XX_CAPTURE_STREAM_EN:
227 if (dev->adev.capture_stream == STREAM_OFF && arg == 1) { 227 if (dev->adev.capture_stream == STREAM_OFF && arg == EM28XX_START_AUDIO) {
228 dev->adev.capture_stream = STREAM_ON; 228 dev->adev.capture_stream = STREAM_ON;
229 em28xx_init_audio_isoc(dev); 229 em28xx_init_audio_isoc(dev);
230 } else if (dev->adev.capture_stream == STREAM_ON && arg == 0) { 230 } else if (dev->adev.capture_stream == STREAM_ON && arg == EM28XX_STOP_AUDIO) {
231 dev->adev.capture_stream = STREAM_OFF; 231 dev->adev.capture_stream = STREAM_OFF;
232 em28xx_deinit_isoc_audio(dev); 232 em28xx_deinit_isoc_audio(dev);
233 } else { 233 } else {
@@ -369,7 +369,7 @@ static int snd_em28xx_hw_capture_free(struct snd_pcm_substream *substream)
369 dprintk("Stop capture, if needed\n"); 369 dprintk("Stop capture, if needed\n");
370 370
371 if (dev->adev.capture_stream == STREAM_ON) 371 if (dev->adev.capture_stream == STREAM_ON)
372 em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 0); 372 em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, EM28XX_STOP_AUDIO);
373 373
374 return 0; 374 return 0;
375} 375}
@@ -391,11 +391,11 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream,
391 spin_lock(&dev->adev.slock); 391 spin_lock(&dev->adev.slock);
392 switch (cmd) { 392 switch (cmd) {
393 case SNDRV_PCM_TRIGGER_START: 393 case SNDRV_PCM_TRIGGER_START:
394 em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 1); 394 em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, EM28XX_START_AUDIO);
395 retval = 0; 395 retval = 0;
396 break; 396 break;
397 case SNDRV_PCM_TRIGGER_STOP: 397 case SNDRV_PCM_TRIGGER_STOP:
398 em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 0); 398 em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, EM28XX_STOP_AUDIO);
399 retval = 0; 399 retval = 0;
400 break; 400 break;
401 default: 401 default: