1. 21 2月, 2007 2 次提交
    • P
      V4L/DVB (5035): Pvrusb2: Enable radio mode round #2 · 25d8527a
      Pantelis Koukousoulas 提交于
      This is the logic that:
        a) Ensures /sys/class/pvrusb2/sn-*/ctl_frequency/{max,min}_val are
           "automagically" reset to sane values on each mode change.
      
        b) Allows tuning to a radio frequency by something like:
           echo `perl -e "print int(94.9*16000 + 0.5)"` \
             > /sys/class/pvrusb2/sn-*/ctl_input/cur_val
      
      
      The trick was to take advantage of the already existing .get_{min,max}_value
      function pointers in pvr2_ctrl, to "dynamically override" the hardcoded values
      for min/max frequency at runtime.
      
      For a moment I thought to dispose of the hardcoded MIN/MAX_FREQ and use the
      hirange/lowrange fields of the v4l2_tuner struct instead, but then I see that
      tuner-core.c kinda hardcodes these as well, so I decided to not bother.
      Signed-off-by: NPantelis Koukousoulas <pakt223@freemail.gr>
      Signed-off-by: NMike Isely <isely@pobox.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      25d8527a
    • P
      V4L/DVB (5034): Pvrusb2: Enable radio mode round #1 · 275b2e28
      Pantelis Koukousoulas 提交于
      This is the logic that supports switching modes via e.g.,
        echo radio > /sys/class/pvrusb2/sn-*/ctl_input/cur_val.
      
      To do the mode switching we need to:
      a) broadcast AUDC_SET_RADIO and
      b) issue the CX2341X_ENC_MUTE_VIDEO command to the encoder. 
      
      The first is done by adding a new pvr2_i2c_op and having it trigger on 
      input change, the second by adding this command in pvr2_encoder_start() 
      and requesting an encoder restart on input change by setting 
      stale_subsys_mask appropriately. 
      
      The clues about AUDC_SET_RADIO and CX2341X_ENC_MUTE_VIDEO were kindly 
      provided by Hans Verkuil on the pvrusb2 mailing list. The idea to 
      implement mode switching this way (on input change) is due to Mike Isely.
      
      Why AUDC_SET_RADIO/VIDIOC_S_STD are used for switching? I can 't be sure, 
      but I think this can be traced to a cornell student being the first to 
      implement radio support in ivtv "as a different standard". I think the 
      rest just evolved from there (it 's in the ivtv ML archives).
      Signed-off-by: NPantelis Koukousoulas <pakt223@freemail.gr>
      Signed-off-by: NMike Isely <isely@pobox.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      275b2e28
  2. 26 9月, 2006 1 次提交
  3. 01 7月, 2006 1 次提交
  4. 27 6月, 2006 1 次提交