Re: [PATCH] bttv: Re-enabling radio support requires the use of struct bttv_fh.

Mauro Carvalho Chehab
2008-02-27T09:54:15Z

On Wed, 27 Feb 2008 01:47:29 +0000
Robert Fitzsimons <robfitz@273k.net> wrote:

> A number of the radio tuner ioctl functions are shared with the TV
> tuner, these functions require a struct bttv_fh data structure to be
> allocated and initialized.
>
> Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
> ---
> drivers/media/video/bt8xx/bttv-driver.c | 21 ++++++++++++++++-----
> 1 files changed, 16 insertions(+), 5 deletions(-)
>
>
> Mauro, the radio_open function may want to do more initialisation then
> the amount I copied from bttv_open.

Maybe, but the proper way would be to use just one open for both radio and
video, like cx88. This driver violates V4L2 API, since the spec says that
opening /dev/radio will select radio, by default, but it is possible to listen
video also on that interface (the opposite is valid also for /dev/video).

I'll apply the fixes, for now. The better would be if you could try to use the
same approach present on cx88.

Cheers,
Mauro