diff mbox

[RFC,09/10] bttv: fix mute on last close of the video device node

Message ID 1363807490-3906-10-git-send-email-fschaefer.oss@googlemail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Frank Schäfer March 20, 2013, 7:24 p.m. UTC
Instead of applying the current mute setting on last device node close, always
mute the device.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
 drivers/media/pci/bt8xx/bttv-driver.c |    2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

Comments

Hans Verkuil March 21, 2013, 10:56 a.m. UTC | #1
On Wed 20 March 2013 20:24:49 Frank Schäfer wrote:
> Instead of applying the current mute setting on last device node close, always
> mute the device.

I am very pleased with the preceding 8 patches. That does exactly what I had
in mind. For this patch and the next (I would have combined those two into one
patch BTW) I want to do some testing first. Unfortunately due to travel I will
not have access to bttv hardware for the next 10 days or so.

One thing I am considering is adding some basic tuner-ownership functionality
to the v4l2 core. Without that I don't think we can ever get this working as
it should.

It might be an idea to make a pull request for the first 8 patches some time
next week. That's all good stuff and it makes the code much easier to
understand.

Regards,

	Hans

> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> ---
>  drivers/media/pci/bt8xx/bttv-driver.c |    2 +-
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
> 
> diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
> index 2fb2168..469ea06 100644
> --- a/drivers/media/pci/bt8xx/bttv-driver.c
> +++ b/drivers/media/pci/bt8xx/bttv-driver.c
> @@ -3126,7 +3126,7 @@ static int bttv_release(struct file *file)
>  	bttv_field_count(btv);
>  
>  	if (!btv->users)
> -		audio_mute(btv, btv->mute);
> +		audio_mute(btv, 1);
>  
>  	v4l2_fh_del(&fh->fh);
>  	v4l2_fh_exit(&fh->fh);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Frank Schäfer March 21, 2013, 5:44 p.m. UTC | #2
Am 21.03.2013 11:56, schrieb Hans Verkuil:
> On Wed 20 March 2013 20:24:49 Frank Schäfer wrote:
>> Instead of applying the current mute setting on last device node close, always
>> mute the device.
> I am very pleased with the preceding 8 patches. That does exactly what I had
> in mind. For this patch and the next (I would have combined those two into one
> patch BTW) I want to do some testing first. Unfortunately due to travel I will
> not have access to bttv hardware for the next 10 days or so.

No problem, I don't think this is high priority stuff. ;)

> One thing I am considering is adding some basic tuner-ownership functionality
> to the v4l2 core. Without that I don't think we can ever get this working as
> it should.

Sounds good !

> It might be an idea to make a pull request for the first 8 patches some time
> next week. That's all good stuff and it makes the code much easier to
> understand.

Ok, I will resend the first 8 patches witch you ACK added and RFC removed.
Please drop me a message when you have tested the last two patches and
want me to take further actions.

Thanks for reviewing !

Regards,
Frank

> Regards,
>
> 	Hans
>
>> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
>> ---
>>  drivers/media/pci/bt8xx/bttv-driver.c |    2 +-
>>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
>>
>> diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
>> index 2fb2168..469ea06 100644
>> --- a/drivers/media/pci/bt8xx/bttv-driver.c
>> +++ b/drivers/media/pci/bt8xx/bttv-driver.c
>> @@ -3126,7 +3126,7 @@ static int bttv_release(struct file *file)
>>  	bttv_field_count(btv);
>>  
>>  	if (!btv->users)
>> -		audio_mute(btv, btv->mute);
>> +		audio_mute(btv, 1);
>>  
>>  	v4l2_fh_del(&fh->fh);
>>  	v4l2_fh_exit(&fh->fh);
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 2fb2168..469ea06 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -3126,7 +3126,7 @@  static int bttv_release(struct file *file)
 	bttv_field_count(btv);
 
 	if (!btv->users)
-		audio_mute(btv, btv->mute);
+		audio_mute(btv, 1);
 
 	v4l2_fh_del(&fh->fh);
 	v4l2_fh_exit(&fh->fh);