diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-02-08 02:38:10 -0200 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-02-08 02:38:10 -0200 |
commit | 46b15827cbd9a9297b369049585c78e6e685aacd (patch) | |
tree | 17a1784ea095c41d0cdc72ead91905e34f00e9e2 | |
parent | a24b83e8ea0f14b0f879c03a8d9547b6cb06e7e4 (diff) | |
download | mediapointer-dvb-s2-46b15827cbd9a9297b369049585c78e6e685aacd.tar.gz mediapointer-dvb-s2-46b15827cbd9a9297b369049585c78e6e685aacd.tar.bz2 |
em28xx-audio: Add macros EM28XX_START_AUDIO / EM28XX_STOP_AUDIO
From: Douglas Schilling Landgraf <dougsland@redhat.com>
Added macros EM28XX_START_AUDIO and EM28XX_STOP_AUDIO for em28xx_cmd().
Priority: normal
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-audio.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-audio.c b/linux/drivers/media/video/em28xx/em28xx-audio.c index 1d665ba27..e7dfebd7b 100644 --- a/linux/drivers/media/video/em28xx/em28xx-audio.c +++ b/linux/drivers/media/video/em28xx/em28xx-audio.c @@ -246,10 +246,10 @@ static int em28xx_cmd(struct em28xx *dev, int cmd, int arg) switch (cmd) { case EM28XX_CAPTURE_STREAM_EN: - if (dev->adev.capture_stream == STREAM_OFF && arg == 1) { + if (dev->adev.capture_stream == STREAM_OFF && arg == EM28XX_START_AUDIO) { dev->adev.capture_stream = STREAM_ON; em28xx_init_audio_isoc(dev); - } else if (dev->adev.capture_stream == STREAM_ON && arg == 0) { + } else if (dev->adev.capture_stream == STREAM_ON && arg == EM28XX_STOP_AUDIO) { dev->adev.capture_stream = STREAM_OFF; em28xx_deinit_isoc_audio(dev); } else { @@ -425,7 +425,7 @@ static int snd_em28xx_hw_capture_free(struct snd_pcm_substream *substream) dprintk("Stop capture, if needed\n"); if (dev->adev.capture_stream == STREAM_ON) - em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 0); + em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, EM28XX_STOP_AUDIO); return 0; } @@ -455,11 +455,11 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream, spin_lock(&dev->adev.slock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: - em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 1); + em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, EM28XX_START_AUDIO); retval = 0; break; case SNDRV_PCM_TRIGGER_STOP: - em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, 0); + em28xx_cmd(dev, EM28XX_CAPTURE_STREAM_EN, EM28XX_STOP_AUDIO); retval = 0; break; default: diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index f3d0d3184..81e7292ae 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -112,6 +112,10 @@ #define EM28XX_BOARD_NOT_VALIDATED 1 #define EM28XX_BOARD_VALIDATED 0 +/* Params for em28xx_cmd() audio */ +#define EM28XX_START_AUDIO 1 +#define EM28XX_STOP_AUDIO 0 + /* maximum number of em28xx boards */ #define EM28XX_MAXBOARDS 4 /*FIXME: should be bigger */ |