mbox series

[0/3] Fix streaming on/off logic

Message ID cover.1632689033.git.mchehab+huawei@kernel.org (mailing list archive)
Headers show
Series Fix streaming on/off logic | expand

Message

Mauro Carvalho Chehab Sept. 26, 2021, 8:51 p.m. UTC
As discussed on:
	https://github.com/hselasky/webcamd/issues/16

the dib0700 had a regression on Kernel 2.6.39. Such regression didn't
affect most devices, in practice, as it seems to happen only under
certain circunstances. 

Michael came up with a solution for the issue (already submitted to
the ML) but let's take the opportunity to do a cleanup, as the resulting
code was still touching both adapters when an stream off command
was issued to one adapter, turning on the other one.

After the change, each adapter is idependently controlled by
a separate bit, as can be shown when its debug message 
is turned on (tested on a dual-adapter device: Hauppauge
WinTV Nova TD):

[608855.124780] adapter 1, streaming ON: 0f 10 12
[608868.189827] adapter 0, streaming ON: 0f 10 13
[608879.584330] adapter 1, streaming OFF: 0f 00 11
[608887.014772] adapter 0, streaming OFF: 0f 00 10

Mauro Carvalho Chehab (2):
  media: dib0700: cleanup start/stop streaming logic
  media: dib0700: Only touch one bit when start/stop an adapter

Michael Kuron (1):
  media: dib0700: fix undefined behavior in tuner shutdown

 drivers/media/usb/dvb-usb/dib0700_core.c | 28 +++++++++++-------------
 1 file changed, 13 insertions(+), 15 deletions(-)

Comments

Hans Petter Selasky Dec. 21, 2021, 6:34 a.m. UTC | #1
On 9/26/21 22:51, Mauro Carvalho Chehab wrote:
> As discussed on:
> 	https://github.com/hselasky/webcamd/issues/16
> 
> the dib0700 had a regression on Kernel 2.6.39. Such regression didn't
> affect most devices, in practice, as it seems to happen only under
> certain circunstances.
> 
> Michael came up with a solution for the issue (already submitted to
> the ML) but let's take the opportunity to do a cleanup, as the resulting
> code was still touching both adapters when an stream off command
> was issued to one adapter, turning on the other one.
> 
> After the change, each adapter is idependently controlled by
> a separate bit, as can be shown when its debug message
> is turned on (tested on a dual-adapter device: Hauppauge
> WinTV Nova TD):
> 
> [608855.124780] adapter 1, streaming ON: 0f 10 12
> [608868.189827] adapter 0, streaming ON: 0f 10 13
> [608879.584330] adapter 1, streaming OFF: 0f 00 11
> [608887.014772] adapter 0, streaming OFF: 0f 00 10
> 
> Mauro Carvalho Chehab (2):
>    media: dib0700: cleanup start/stop streaming logic
>    media: dib0700: Only touch one bit when start/stop an adapter
> 
> Michael Kuron (1):
>    media: dib0700: fix undefined behavior in tuner shutdown
> 
>   drivers/media/usb/dvb-usb/dib0700_core.c | 28 +++++++++++-------------
>   1 file changed, 13 insertions(+), 15 deletions(-)
> 

Were these patches upstreamed yet?

--HPS
Mauro Carvalho Chehab Dec. 22, 2021, 11:50 a.m. UTC | #2
Em Tue, 21 Dec 2021 07:34:27 +0100
Hans Petter Selasky <hps@selasky.org> escreveu:

> On 9/26/21 22:51, Mauro Carvalho Chehab wrote:
> > As discussed on:
> > 	https://github.com/hselasky/webcamd/issues/16
> > 
> > the dib0700 had a regression on Kernel 2.6.39. Such regression didn't
> > affect most devices, in practice, as it seems to happen only under
> > certain circunstances.
> > 
> > Michael came up with a solution for the issue (already submitted to
> > the ML) but let's take the opportunity to do a cleanup, as the resulting
> > code was still touching both adapters when an stream off command
> > was issued to one adapter, turning on the other one.
> > 
> > After the change, each adapter is idependently controlled by
> > a separate bit, as can be shown when its debug message
> > is turned on (tested on a dual-adapter device: Hauppauge
> > WinTV Nova TD):
> > 
> > [608855.124780] adapter 1, streaming ON: 0f 10 12
> > [608868.189827] adapter 0, streaming ON: 0f 10 13
> > [608879.584330] adapter 1, streaming OFF: 0f 00 11
> > [608887.014772] adapter 0, streaming OFF: 0f 00 10
> > 
> > Mauro Carvalho Chehab (2):
> >    media: dib0700: cleanup start/stop streaming logic
> >    media: dib0700: Only touch one bit when start/stop an adapter
> > 
> > Michael Kuron (1):
> >    media: dib0700: fix undefined behavior in tuner shutdown
> > 
> >   drivers/media/usb/dvb-usb/dib0700_core.c | 28 +++++++++++-------------
> >   1 file changed, 13 insertions(+), 15 deletions(-)
> >   
> 
> Were these patches upstreamed yet?

Those were merged on media upstream tree. They should likely be
merged upstream before v5.17-rc1.

> 
> --HPS



Thanks,
Mauro