radio-tea5777.c (b530a447bb588fdf43fdf4eb909e4ee1921d47ac) | radio-tea5777.c (2f73c7c582a685b3198b974cd6d964d0338f8ab5) |
---|---|
1/* 2 * v4l2 driver for TEA5777 Philips AM/FM radio tuner chips 3 * 4 * Copyright (c) 2012 Hans de Goede <hdegoede@redhat.com> 5 * 6 * Based on the ALSA driver for TEA5757/5759 Philips AM/FM radio tuner chips: 7 * 8 * Copyright (c) 2004 Jaroslav Kysela <perex@perex.cz> --- 322 unchanged lines hidden (view full) --- 331 332 /* Invalidate read_reg, so that next call we return up2date signal */ 333 tea->read_reg = -1; 334 335 return 0; 336} 337 338static int vidioc_s_tuner(struct file *file, void *priv, | 1/* 2 * v4l2 driver for TEA5777 Philips AM/FM radio tuner chips 3 * 4 * Copyright (c) 2012 Hans de Goede <hdegoede@redhat.com> 5 * 6 * Based on the ALSA driver for TEA5757/5759 Philips AM/FM radio tuner chips: 7 * 8 * Copyright (c) 2004 Jaroslav Kysela <perex@perex.cz> --- 322 unchanged lines hidden (view full) --- 331 332 /* Invalidate read_reg, so that next call we return up2date signal */ 333 tea->read_reg = -1; 334 335 return 0; 336} 337 338static int vidioc_s_tuner(struct file *file, void *priv, |
339 struct v4l2_tuner *v) | 339 const struct v4l2_tuner *v) |
340{ 341 struct radio_tea5777 *tea = video_drvdata(file); 342 u32 orig_audmode = tea->audmode; 343 344 if (v->index) 345 return -EINVAL; 346 | 340{ 341 struct radio_tea5777 *tea = video_drvdata(file); 342 u32 orig_audmode = tea->audmode; 343 344 if (v->index) 345 return -EINVAL; 346 |
347 if (v->audmode > V4L2_TUNER_MODE_STEREO) 348 v->audmode = V4L2_TUNER_MODE_STEREO; 349 | |
350 tea->audmode = v->audmode; | 347 tea->audmode = v->audmode; |
348 if (tea->audmode > V4L2_TUNER_MODE_STEREO) 349 tea->audmode = V4L2_TUNER_MODE_STEREO; |
|
351 352 if (tea->audmode != orig_audmode && tea->band == BAND_FM) 353 return radio_tea5777_set_freq(tea); 354 355 return 0; 356} 357 358static int vidioc_g_frequency(struct file *file, void *priv, --- 246 unchanged lines hidden --- | 350 351 if (tea->audmode != orig_audmode && tea->band == BAND_FM) 352 return radio_tea5777_set_freq(tea); 353 354 return 0; 355} 356 357static int vidioc_g_frequency(struct file *file, void *priv, --- 246 unchanged lines hidden --- |