public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: AW <arne_woerner@yahoo.com>
To: linux-media@vger.kernel.org
Cc: dheitmueller@kernellabs.com
Subject: Re: PCTV USB2 PAL / adds loud hum to correct audio
Date: Sat, 12 Feb 2011 13:44:21 -0800 (PST)	[thread overview]
Message-ID: <450670.60996.qm@web30306.mail.mud.yahoo.com> (raw)
In-Reply-To: <AANLkTinv7sWE+T1ORrr8MD6XRGQj8hG1sZw9UfjSGM-o@mail.gmail.com>

Devin Heitmueller <dheitmueller@kernellabs.com> wrote:
> > When I use this command  simultaneously:
> > arecord -D front:CARD=PAL,DEV=0 -f S16_LE -c 2 -r 8000  /aux/tmp/bla.wav
> > I get correct audio with strong noise:
> > http://www.wgboome.de./bla.wav
> > (it is from input=1 for copyright  reasons... so there is silence plus 
noise)
> 
> The "-r" argument should  almost certainly be 48000, not 8000.
> 
Maybe...
That device is rather old...
And i didnt tell pactl anything about sample rate...

With the filter from the appendix the noise is gone...
But it feels like a dirty hack, because it would cut out (overly?) loud noise, 
2...

My wild guess is, that the usbaudio driver injects some bad samples 
(0x8000..0x9000) every appr. 256 bytes...

-Arne

appendix:
#include <stdint.h>
#include <unistd.h>

int main() {
uint16_t buf[1000000];
const int r = read(0,buf,sizeof(buf));
for (int i=0; i*sizeof(*buf)<r; i++) {
if (buf[i]/256>=0x80 && buf[i]/256<0x90) continue;
if (write(1,buf+i,2) != 2) break;
}
return 0;
}



  reply	other threads:[~2011-02-12 21:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-12 20:22 PCTV USB2 PAL / adds loud hum to correct audio AW
2011-02-12 21:33 ` Devin Heitmueller
2011-02-12 21:44   ` AW [this message]
2011-02-12 23:34     ` Andy Walls
  -- strict thread matches above, loose matches on Subject: below --
2011-02-13  8:41 AW
2011-02-17  9:24 AW

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=450670.60996.qm@web30306.mail.mud.yahoo.com \
    --to=arne_woerner@yahoo.com \
    --cc=dheitmueller@kernellabs.com \
    --cc=linux-media@vger.kernel.org \
    /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