Re: cx25840: allow setting radio audio mode stereo/mono

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em 16-01-2012 13:32, Miroslav Slugeň escreveu:
> 
> cx25840_s_tuner_radio_support.patch

Signed-off-by: is missing.
> 
> 
> Signed-off-by: Miroslav Slugen <thunder.mmm@xxxxxxxxx>
> From: Miroslav Slugen <thunder.mmm@xxxxxxxxx>
> 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;
> +

Well, this is true for all radio devices: only mono/stereo modes are supported.
A check like that probably makes sense at the V4L2 core [1], as otherwise, the
same test would be needed on all radio drivers.

[1] drivers/media/video/v4l2-ioctl.c

Regards,
Mauro

>  	switch (vt->audmode) {
>  		case V4L2_TUNER_MODE_MONO:
>  			/* mono      -> mono
> -- 1.7.2.3
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux