Date:2011-10-08 21:25:17 (8 years 11 months ago)
Author:Maarten ter Huurne
Commit:a198ec47412919b4ee97ddc41315b3acf4708f27
Message:media: radio: RDA5807: Implemented VIDIOC_QUERYCAP ioctl.

Files: drivers/media/radio/radio-rda5807.c (3 diffs)

Change Details

drivers/media/radio/radio-rda5807.c
271271    .s_ctrl = rda5807_s_ctrl,
272272};
273273
274static int rda5807_vidioc_querycap(struct file *file, void *fh,
275                   struct v4l2_capability *cap)
276{
277    *cap = (struct v4l2_capability) {
278        .driver = "rda5807",
279        .card = "RDA5807 FM receiver",
280        .bus_info = "I2C",
281        .capabilities = V4L2_CAP_RADIO | V4L2_CAP_TUNER,
282    };
283
284    return 0;
285}
286
274287static int rda5807_vidioc_g_audio(struct file *file, void *fh,
275288                  struct v4l2_audio *a)
276289{
...... 
347360}
348361
349362static const struct v4l2_ioctl_ops rda5807_ioctl_ops = {
350    .vidioc_g_audio = rda5807_vidioc_g_audio,
351    .vidioc_g_tuner = rda5807_vidioc_g_tuner,
352    .vidioc_s_frequency = rda5807_vidioc_s_frequency,
363    .vidioc_querycap = rda5807_vidioc_querycap,
364    .vidioc_g_audio = rda5807_vidioc_g_audio,
365    .vidioc_g_tuner = rda5807_vidioc_g_tuner,
366    .vidioc_s_frequency = rda5807_vidioc_s_frequency,
353367};
354368
355369static int __devinit rda5807_i2c_probe(struct i2c_client *client,
...... 
394408              V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);
395409    v4l2_ctrl_new_std(&radio->ctrl_handler, &rda5807_ctrl_ops,
396410              V4L2_CID_AUDIO_VOLUME, 0, 15, 1, 8);
411    /* TODO: V4L2_CID_TUNE_PREEMPHASIS is based on V4L2_CID_FM_TX_CLASS_BASE
412     * which suggests it is a transmit control rather than a receive
413     * control. The register bit we change is called "de-emphasis",
414     * but there is no de-emphasis control in V4L2.
415     */
397416    v4l2_ctrl_new_std_menu(&radio->ctrl_handler, &rda5807_ctrl_ops,
398417                   V4L2_CID_TUNE_PREEMPHASIS,
399418                   V4L2_PREEMPHASIS_75_uS,

Archive Download the corresponding diff file



interactive