V4L/DVB (8627): Fix mute on bttv driver
authorMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 5 Aug 2008 13:12:35 +0000 (10:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:47 +0000 (09:36 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/bt8xx/bttv-driver.c

index c3526d0258f8d2e60bf83bcb3de7ea3fc7f49d91..035a58d1aaa47e4658fd06a4140ed9a9fcf9bb8d 100644 (file)
@@ -3275,6 +3275,7 @@ static int bttv_open(struct inode *inode, struct file *file)
                            sizeof(struct bttv_buffer),
                            fh);
        set_tvnorm(btv,btv->tvnorm);
+       set_input(btv, btv->input, btv->tvnorm);
 
        btv->users++;
 
@@ -3336,6 +3337,10 @@ static int bttv_release(struct inode *inode, struct file *file)
 
        btv->users--;
        bttv_field_count(btv);
+
+       if (!btv->users)
+               audio_mute(btv, 1);
+
        return 0;
 }