diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-audio.c | 5 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 2c7343d3139d..8c67f678266a 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -269,8 +269,11 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream *substream) | |||
269 | dprintk("opening device and trying to acquire exclusive lock\n"); | 269 | dprintk("opening device and trying to acquire exclusive lock\n"); |
270 | 270 | ||
271 | /* Sets volume, mute, etc */ | 271 | /* Sets volume, mute, etc */ |
272 | |||
272 | dev->mute = 0; | 273 | dev->mute = 0; |
274 | mutex_lock(&dev->lock); | ||
273 | ret = em28xx_audio_analog_set(dev); | 275 | ret = em28xx_audio_analog_set(dev); |
276 | mutex_unlock(&dev->lock); | ||
274 | if (ret < 0) | 277 | if (ret < 0) |
275 | goto err; | 278 | goto err; |
276 | 279 | ||
@@ -302,7 +305,9 @@ static int snd_em28xx_pcm_close(struct snd_pcm_substream *substream) | |||
302 | dprintk("closing device\n"); | 305 | dprintk("closing device\n"); |
303 | 306 | ||
304 | dev->mute = 1; | 307 | dev->mute = 1; |
308 | mutex_lock(&dev->lock); | ||
305 | em28xx_audio_analog_set(dev); | 309 | em28xx_audio_analog_set(dev); |
310 | mutex_unlock(&dev->lock); | ||
306 | 311 | ||
307 | if (dev->adev->users == 0 && dev->adev->shutdown == 1) { | 312 | if (dev->adev->users == 0 && dev->adev->shutdown == 1) { |
308 | dprintk("audio users: %d\n", dev->adev->users); | 313 | dprintk("audio users: %d\n", dev->adev->users); |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 9759a7330a53..813c0af458d3 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -345,7 +345,6 @@ int em28xx_read_reg(struct em28xx *dev, u16 reg); | |||
345 | int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf, | 345 | int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf, |
346 | int len); | 346 | int len); |
347 | int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len); | 347 | int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len); |
348 | int em28xx_set_audio_source(struct em28xx *dev); | ||
349 | int em28xx_audio_analog_set(struct em28xx *dev); | 348 | int em28xx_audio_analog_set(struct em28xx *dev); |
350 | 349 | ||
351 | int em28xx_colorlevels_set_default(struct em28xx *dev); | 350 | int em28xx_colorlevels_set_default(struct em28xx *dev); |