linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] V4L/DVB: tuner and radio addresses are missing for the PixelView PlayTV card
@ 2008-03-01 21:37 Wojciech Migda
  0 siblings, 0 replies; 2+ messages in thread
From: Wojciech Migda @ 2008-03-01 21:37 UTC (permalink / raw)
  To: mchehab, v4l-dvb-maintainer; +Cc: torvalds, linux-kernel, trivial

From: Wojciech Migda <wojtek.golf@interia.pl>

the PixelView PlayTV card definition structure was missing initialization of the tuner_addr and radio_addr fields. As a result it was impossible to have the tuner initialized using parameters specified while loading the bttv.ko module. This regression became visible after the v4l rearrangements introduced somewhere around 2.6.15 kernel version. The root cause for the tuner initialization failure is located in the attach_inform function in the bttv-i2c.c file. There at the very beginning the addr variable holding the tuner device address is initialized with the value taken from the bttv_tvcards array. For the PixelView PlayTV card the tuner address field (and the radio address as well) was uninitialized, and thus equal 0. Later in that function execution of the TUNER_SET_TYPE_ADDR tuner command is guarded with check for the tuner address either equal ADDR_UNSET, or client->addr. Since both are non-zero (the latter in case of   the card owned by me at the runtime is equal 0x61) the TUNER_SET_TYPE_ADDR command is not executed, and consequently in the tuner_attach function in the tuner-core.c file call to i2c_attach_client does not result in assigning the tuner type variable with the requested value. Providing initialization of the tuner_addr and radio_addr with ADDR_UNSET values as it is already done for other tv cards defined in bttv-cards.c ensures that the tuner initialization is done correctly, just as it used to be in the 2.6.14 kernel.


        Developer's Certificate of Origin 1.1

        By making a contribution to this project, I certify that:

        (a) The contribution was created in whole or in part by me and I
            have the right to submit it under the open source license
            indicated in the file; or

        (b) The contribution is based upon previous work that, to the best
            of my knowledge, is covered under an appropriate open source
            license and I have the right under that license to submit that
            work with modifications, whether created in whole or in part
            by me, under the same open source license (unless I am
            permitted to submit under a different license), as indicated
            in the file; or

        (c) The contribution was provided directly to me by some other
            person who certified (a), (b) or (c) and I have not modified
            it.

        (d) I understand and agree that this project and the contribution
            are public and that a record of the contribution (including all
            personal information I submit with it, including my sign-off) is
            maintained indefinitely and may be redistributed consistent with
            this project or the open source license(s) involved.


        Signed-off-by: Wojciech Migda <wojtek.golf@interia.pl>

---

--- drivers/media/video/bt8xx/bttv-cards.c.orig	2007-07-08 23:32:17.000000000 +0000
+++ drivers/media/video/bt8xx/bttv-cards.c	2008-03-01 20:48:19.183306298 +0000
@@ -588,6 +588,8 @@ struct tvcard bttv_tvcards[] = {
 		.needs_tvaudio	= 1,
 		.pll		= PLL_28,
 		.tuner_type	= -1,
+		.tuner_addr	= ADDR_UNSET,
+		.radio_addr	= ADDR_UNSET,
 	},
 	[BTTV_BOARD_WINVIEW_601] = {
 		.name		= "Leadtek WinView 601",



----------------------------------------------------------------------
Asy i Cieniasy pilkarskiej ekstraklasy
kliknij >> http://link.interia.pl/f1d27


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] V4L/DVB: tuner and radio addresses are missing for the PixelView PlayTV card
@ 2008-03-03  8:35 Wojciech Migda
  0 siblings, 0 replies; 2+ messages in thread
From: Wojciech Migda @ 2008-03-03  8:35 UTC (permalink / raw)
  To: mchehab, v4l-dvb-maintainer; +Cc: torvalds, linux-kernel, trivial

Hi again,

the previous patch was for the 2.6.22 kernel. The two below are for the 2.6.24.3 and 2.6.25-rc3, respectively:

         Signed-off-by: Wojciech Migda <wojtek <dot> golf <at> interia <dot> pl>

---
--- /usr/src/linux/drivers/media/video/bt8xx/bttv-cards.c.orig	2008-03-03 08:13:47.000000000 +0000
+++ /usr/src/linux/drivers/media/video/bt8xx/bttv-cards.c	2008-03-03 08:20:33.944363735 +0000
@@ -589,6 +589,8 @@ struct tvcard bttv_tvcards[] = {
 		.needs_tvaudio	= 1,
 		.pll		= PLL_28,
 		.tuner_type	= UNSET,
+		.tuner_addr	= ADDR_UNSET,
+		.radio_addr	= ADDR_UNSET,
 	},
 	[BTTV_BOARD_WINVIEW_601] = {
 		.name		= "Leadtek WinView 601",


---
--- /usr/src/linux/drivers/media/video/bt8xx/bttv-cards.c.orig	2008-03-03 08:14:56.000000000 +0000
+++ /usr/src/linux/drivers/media/video/bt8xx/bttv-cards.c	2008-03-03 08:27:42.217028054 +0000
@@ -576,6 +576,8 @@ struct tvcard bttv_tvcards[] = {
 		.needs_tvaudio	= 1,
 		.pll		= PLL_28,
 		.tuner_type	= UNSET,
+		.tuner_addr	= ADDR_UNSET,
+		.radio_addr	= ADDR_UNSET,
 	},
 	[BTTV_BOARD_WINVIEW_601] = {
 		.name		= "Leadtek WinView 601",

> From: Wojciech Migda <wojtek.golf@interia.pl>
> 
> the PixelView PlayTV card definition structure was missing initialization
> of the tuner_addr and radio_addr fields. As a result it was impossible to
> have the tuner initialized using parameters specified while loading the
> bttv.ko module. This regression became visible after the v4l rearrangements
> introduced somewhere around 2.6.15 kernel version. The root cause for the
> tuner initialization failure is located in the attach_inform function in
> the bttv-i2c.c file. There at the very beginning the addr variable holding
> the tuner device address is initialized with the value taken from the
> bttv_tvcards array. For the PixelView PlayTV card the tuner address field
> (and the radio address as well) was uninitialized, and thus equal 0. Later
> in that function execution of the TUNER_SET_TYPE_ADDR tuner command is
> guarded with check for the tuner address either equal ADDR_UNSET, or
> client->addr. Since both are non-zero (the latter in case of   the card
> owned by me at the runtime is equal 0x61) the TUNER_SET_TYPE_ADDR command
> is not executed, and consequently in the tuner_attach function in the
> tuner-core.c file call to i2c_attach_client does not result in assigning
> the tuner type variable with the requested value. Providing initialization
> of the tuner_addr and radio_addr with ADDR_UNSET values as it is already
> done for other tv cards defined in bttv-cards.c ensures that the tuner
> initialization is done correctly, just as it used to be in the 2.6.14
> kernel.
> 
> 
>         Developer's Certificate of Origin 1.1
> 
>         By making a contribution to this project, I certify that:
> 
>         (a) The contribution was created in whole or in part by me and I
>             have the right to submit it under the open source license
>             indicated in the file; or
> 
>         (b) The contribution is based upon previous work that, to the
> best
>             of my knowledge, is covered under an appropriate open source
>             license and I have the right under that license to submit
> that
>             work with modifications, whether created in whole or in part
>             by me, under the same open source license (unless I am
>             permitted to submit under a different license), as indicated
>             in the file; or
> 
>         (c) The contribution was provided directly to me by some other
>             person who certified (a), (b) or (c) and I have not modified
>             it.
> 
>         (d) I understand and agree that this project and the contribution
>             are public and that a record of the contribution (including
> all
>             personal information I submit with it, including my sign-off)
> is
>             maintained indefinitely and may be redistributed consistent
> with
>             this project or the open source license(s) involved.
> 
> 
>         Signed-off-by: Wojciech Migda <wojtek.golf@interia.pl>
> 
> ---
> 
> --- drivers/media/video/bt8xx/bttv-cards.c.orig	2007-07-08
> 23:32:17.000000000 +0000
> +++ drivers/media/video/bt8xx/bttv-cards.c	2008-03-01 20:48:19.183306298
> +0000
> @@ -588,6 +588,8 @@ struct tvcard bttv_tvcards[] = {
>  		.needs_tvaudio	= 1,
>  		.pll		= PLL_28,
>  		.tuner_type	= -1,
> +		.tuner_addr	= ADDR_UNSET,
> +		.radio_addr	= ADDR_UNSET,
>  	},
>  	[BTTV_BOARD_WINVIEW_601] = {
>  		.name		= "Leadtek WinView 601",
> 
> 
> 
> 


----------------------------------------------------------------------
Wojna wampirow trwa - po ktorej jestes stronie?
Zagraj >>> http://link.interia.pl/f1cf4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-03  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-01 21:37 [PATCH] V4L/DVB: tuner and radio addresses are missing for the PixelView PlayTV card Wojciech Migda
2008-03-03  8:35 Wojciech Migda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).