[alsa-devel] [PATCH v5] radio-sf16fmr2: convert to generic TEA575x interface
Hans Verkuil
hverkuil at xs4all.nl
Thu May 19 22:56:44 CEST 2011
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 at rainbow-software.org>
Acked-by: Hans Verkuil <hverkuil at xs4all.nl>
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;
> + }
> + }
More information about the Alsa-devel
mailing list