All of lore.kernel.org
 help / color / mirror / Atom feed
* cx25840: allow setting radio audio mode stereo/mono
@ 2012-01-16 15:32 Miroslav Slugeň
  2012-02-28 17:29 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Miroslav Slugeň @ 2012-01-16 15:32 UTC (permalink / raw)
  To: linux-media

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: cx25840_s_tuner_radio_support.patch --]
[-- Type: text/x-patch, Size: 1040 bytes --]

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
From: Miroslav Slugen <thunder.mmm@gmail.com>
Date: Mon, 12 Dec 2011 00:19:34 +0100
Subject: [PATCH] cx25840_s_tuner should support also radio mode for setting
 stereo and mono.

---
diff -Naurp a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
--- a/drivers/media/video/cx25840/cx25840-core.c	2012-01-12 20:42:45.000000000 +0100
+++ b/drivers/media/video/cx25840/cx25840-core.c	2012-01-16 16:18:06.181583026 +0100
@@ -1628,9 +1628,14 @@ static int cx25840_s_tuner(struct v4l2_s
 	struct cx25840_state *state = to_state(sd);
 	struct i2c_client *client = v4l2_get_subdevdata(sd);
 
-	if (state->radio || is_cx2583x(state))
+	if (is_cx2583x(state))
 		return 0;
 
+	/* FM radio supports only mono and stereo modes */
+	if ((state->radio) &&
+	    (vt->audmode != V4L2_TUNER_MODE_MONO) &&
+	    (vt->audmode != V4L2_TUNER_MODE_STEREO)) return -EINVAL;
+
 	switch (vt->audmode) {
 		case V4L2_TUNER_MODE_MONO:
 			/* mono      -> mono
-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-28 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 15:32 cx25840: allow setting radio audio mode stereo/mono Miroslav Slugeň
2012-02-28 17:29 ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.