public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Wool <vital@embeddedalley.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: video4linux-list@redhat.com
Subject: Re: em28xx: Compro VideoMate For You sound problems
Date: Sat, 28 Feb 2009 07:49:24 +0300	[thread overview]
Message-ID: <49A8C254.9080909@embeddedalley.com> (raw)
In-Reply-To: <20090227214005.1ae21704@pedra.chehab.org>

Mauro Carvalho Chehab wrote:
> On Fri, 27 Feb 2009 18:43:07 +0300
> Vitaly Wool <vital@embeddedalley.com> wrote:
>
>   
>> Vitaly Wool wrote:
>>
>>     
>>> Ok, I'm working on that. The problem as of now is that it works fine on 
>>> 2.6.26 and doesn't work with 2.6.29-rc5.
>>> I'll get back to you when I find out the reason.
>>>       
>> And here's the patch that solves the problem:
>>
>> diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
>> index 5aeccb3..ae4b231 100644
>> --- a/drivers/media/video/tvaudio.c
>> +++ b/drivers/media/video/tvaudio.c
>> @@ -169,12 +169,14 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val)
>>  			return -1;
>>  		}
>>  	} else {
>> +#if 0
>>  		if (subaddr + 1 >= ARRAY_SIZE(chip->shadow.bytes)) {
>>  			v4l2_info(sd,
>>  				"Tried to access a non-existent register: %d\n",
>>  				subaddr);
>>  			return -EINVAL;
>>  		}
>> +#endif
>>  
>>  		v4l2_dbg(1, debug, sd, "chip_write: reg%d=0x%x\n",
>>  			subaddr, val);
>>
>>
>>
>> Apparently this check is bogus. The patch for em28xx stuff will follow, after some cleanups.
>>     
>
> Hmm... the check is to avoid accessing an out of range registrer cache. Could you
> please send me the errors generated by the v4l2_info msg?
>   
The ARRAY_SIZE actually is 65 in this situation. I've no idea yet where 
that is derived from.
The "false erroneous" access is to register 255, for quick configuration:

#define TDA9874A_ESP            0xFF    /* easy standard progr. 
(tda9874a) */

So either the bytes array is set up incorrectly, or the check is bogus, 
IMHO.

Thanks,
   Vitaly

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

      reply	other threads:[~2009-02-28  4:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  7:47 em28xx: Compro VideoMate For You sound problems Vitaly Wool
2009-02-25  2:42 ` Mauro Carvalho Chehab
2009-02-25 12:42   ` Vitaly Wool
2009-02-25 12:07     ` Mauro Carvalho Chehab
2009-02-25 15:46       ` Vitaly Wool
2009-02-25 13:18         ` Mauro Carvalho Chehab
2009-02-25 16:58           ` Vitaly Wool
2009-02-25 17:11           ` Vitaly Wool
2009-02-25 18:33             ` Mauro Carvalho Chehab
2009-02-25 19:25               ` Vitaly Wool
2009-02-25 23:40                 ` Mauro Carvalho Chehab
2009-02-27 15:12                   ` Vitaly Wool
2009-02-27 15:43                     ` Vitaly Wool
2009-02-28  0:40                       ` Mauro Carvalho Chehab
2009-02-28  4:49                         ` Vitaly Wool [this message]

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=49A8C254.9080909@embeddedalley.com \
    --to=vital@embeddedalley.com \
    --cc=mchehab@infradead.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