In contrast to video devices, radio devices should not be muted on the last close of the device node. In cases where a device provides a video and a radio device node, tuner ownership has to be taken into account. The current code doesn't handle tuner ownership yet, so never mute the device if the radio device node is still open. Also add a comment about this issue. Signed-off-by: Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx> --- drivers/media/pci/bt8xx/bttv-driver.c | 6 ++++-- 1 Datei geändert, 4 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 6432bfe..7459ad6 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -3114,7 +3114,6 @@ static int bttv_release(struct file *file) } /* free stuff */ - videobuf_mmap_free(&fh->cap); videobuf_mmap_free(&fh->vbi); file->private_data = NULL; @@ -3122,8 +3121,11 @@ static int bttv_release(struct file *file) btv->users--; bttv_field_count(btv); - if (!btv->users) + if (!btv->users && !btv->radio_user) audio_mute(btv, 1); + /* FIXME: should also depend on tuner ownership ! */ + /* NOTE as long as we don't handle the tuner ownership properly, + * only mute the device if the radio device node isn't open. */ v4l2_fh_del(&fh->fh); v4l2_fh_exit(&fh->fh); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html