mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mchehab@brturbo.com.br
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, video4linux-list@redhat.com,
	Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Subject: [Patch 15/20] V4L(916) Fixes set scart parameter definitions and audout ioctl
Date: Mon, 07 Nov 2005 00:58:10 -0200	[thread overview]
Message-ID: <1131333341.25215.19.camel@localhost> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]

From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>

- Fixes set_scart parameter definitions and AUDOUT ioctl

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>

-----------------

diff -upNr oldtree/drivers/media/video/msp3400.c linux/drivers/media/video/msp3400.c
--- oldtree/drivers/media/video/msp3400.c	2005-11-06 16:13:22.000000000 -0200
+++ linux/drivers/media/video/msp3400.c	2005-11-06 16:13:23.000000000 -0200
@@ -417,7 +417,7 @@ static void msp3400c_set_scart(struct i2
 
 	msp->in_scart=in;
 
-	if (in<=2) {
+	if (in >= 1 && in <= 8 && out >= 0 && out <= 2) {
 		if (-1 == scarts[out][in])
 			return;
 
@@ -2128,10 +2128,11 @@ static int msp_command(struct i2c_client
 	case VIDIOC_G_AUDOUT:
 	{
 		struct v4l2_audioout *a=(struct v4l2_audioout *)arg;
+		int idx=a->index;
 
 		memset(a,0,sizeof(*a));
 
-		switch (a->index) {
+		switch (idx) {
 		case 0:
 			strcpy(a->name,"Scart1 Out");
 			break;
@@ -2160,8 +2161,8 @@ static int msp_command(struct i2c_client
 			else
 				msp->i2s_mode=0;
 		}
-printk("Setting audio out on msp34xx to input %i, mode %i\n",a->index,msp->i2s_mode);
-		msp3400c_set_scart(client,msp->in_scart,a->index);
+		dprintk("Setting audio out on msp34xx to input %i, mode %i\n",a->index,msp->i2s_mode);
+		msp3400c_set_scart(client,msp->in_scart,a->index+1);
 
 		break;
 	}


	

	
		
_______________________________________________________ 
Yahoo! Acesso Grátis: Internet rápida e grátis. 
Instale o discador agora!
http://br.acesso.yahoo.com/


                 reply	other threads:[~2005-11-07  3:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1131333341.25215.19.camel@localhost \
    --to=mchehab@brturbo.com.br \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®