Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b069013 authored by Robert Fitzsimons's avatar Robert Fitzsimons Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (7278): bttv: Re-enable radio tuner support for VIDIOCGFREQ/VIDIOCSFREQ ioctls

parent 5cd3955c
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -1990,7 +1990,7 @@ static int bttv_g_frequency(struct file *file, void *priv,
	if (0 != err)
	if (0 != err)
		return err;
		return err;


	f->type = V4L2_TUNER_ANALOG_TV;
	f->type = btv->radio_user ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
	f->frequency = btv->freq;
	f->frequency = btv->freq;


	return 0;
	return 0;
@@ -2009,7 +2009,8 @@ static int bttv_s_frequency(struct file *file, void *priv,


	if (unlikely(f->tuner != 0))
	if (unlikely(f->tuner != 0))
		return -EINVAL;
		return -EINVAL;
	if (unlikely(f->type != V4L2_TUNER_ANALOG_TV))
	if (unlikely(f->type != (btv->radio_user
		? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV)))
		return -EINVAL;
		return -EINVAL;
	mutex_lock(&btv->lock);
	mutex_lock(&btv->lock);
	btv->freq = f->frequency;
	btv->freq = f->frequency;