Project

General

Profile

RE: tv tuner stops working when starting tvheadend ยป v4l-tune.patch

Waldemar S., 2013-06-20 17:37

View differences:

src/v4l.c
173
v4l_service_start(service_t *t, unsigned int weight, int force_start)
173
v4l_service_start(service_t *t, unsigned int weight, int force_start)
174
{
174
{
175
  v4l_adapter_t *va = t->s_v4l_adapter;
175
  v4l_adapter_t *va = t->s_v4l_adapter;
176
  int frequency = t->s_v4l_frequency;
176
  unsigned int frequency = t->s_v4l_frequency;
177
  struct v4l2_frequency vf;
177
  struct v4l2_frequency vf;
178
  int result;
178
  int result;
179
  v4l2_std_id std = 0xff;
179
  v4l2_std_id std = 0xff;
......
204

204

205
    vf.tuner = 0;
205
    vf.tuner = 0;
206
    vf.type = V4L2_TUNER_ANALOG_TV;
206
    vf.type = V4L2_TUNER_ANALOG_TV;
207
    vf.frequency = (frequency * 16) / 1000000;
207
    vf.frequency = (frequency * 16) / 1000;
208
    result = ioctl(fd, VIDIOC_S_FREQUENCY, &vf);
208
    result = ioctl(fd, VIDIOC_S_FREQUENCY, &vf);
209
    if(result < 0) {
209
    if(result < 0) {
210
      tvhlog(LOG_ERR, "v4l",
210
      tvhlog(LOG_ERR, "v4l",
    (1-1/1)