Re: [PATCH v5] radio-sf16fmr2: convert to generic TEA575x interface

From: Hans Verkuil
Date: Thu May 19 2011 - 16:57:10 EST


On Thursday, May 19, 2011 18:15:43 Ondrej Zary wrote:
> Convert radio-sf16fmr2 to use generic TEA575x implementation. Most of the
> driver code goes away as SF16-FMR2 is basically just a TEA5757 tuner
> connected to ISA bus.
> The card can optionally be equipped with PT2254A volume control (equivalent
> of TC9154AP) - the volume setting is completely reworked (with balance control
> added) and tested.
>
> Signed-off-by: Ondrej Zary <linux@xxxxxxxxxxxxxxxxxxxx>

Acked-by: Hans Verkuil <hverkuil@xxxxxxxxx>

Except for one tiny little typo:

> --- linux-2.6.39-rc2-/drivers/media/radio/radio-sf16fmr2.c 2011-04-06 03:30:43.000000000 +0200
> +++ linux-2.6.39-rc2/drivers/media/radio/radio-sf16fmr2.c 2011-05-19 17:56:08.000000000 +0200
> +static int fmr2_tea_ext_init(struct snd_tea575x *tea)
> {
> - return a->index ? -EINVAL : 0;
> -}
> + struct fmr2 *fmr2 = tea->private_data;
>
> -static const struct v4l2_file_operations fmr2_fops = {
> - .owner = THIS_MODULE,
> - .unlocked_ioctl = video_ioctl2,
> -};
> + if (inb(fmr2->io) & FMR2_HASVOL) {
> + fmr2->volume = v4l2_ctrl_new_std(&tea->ctrl_handler, &fmr2_ctrl_ops, V4L2_CID_AUDIO_VOLUME, 0, 68, 2, 56);
> + fmr2->balance = v4l2_ctrl_new_std(&tea->ctrl_handler, &fmr2_ctrl_ops, V4L2_CID_AUDIO_BALANCE, -68, 68, 2, 0);
> + if (tea->ctrl_handler.error) {
> + printk(KERN_ERR "radio-sf16fmr2: can't initialize contrls\n");

contrls -> controls

> + return tea->ctrl_handler.error;
> + }
> + }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/