Re: PCTV USB2 PAL / adds loud hum to correct audio

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

 



On Sat, 2011-02-12 at 13:44 -0800, AW wrote:
> Devin Heitmueller <dheitmueller@xxxxxxxxxxxxxx> 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...

I find audio at 8 ksps very unusual for a TV capture device.


> 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...

I looked at the data.  It is mostly hovering around 0, but you have
bursts of very negative values periodically:

(These values are shown as little endian, so swap the bytes to consider the value)

0000630: faff fdff f9ff fbff 1080 1080 1080 1080  ................
0000640: 1080 1080 faff fbff 1080 1080 8888 8888  ................
0000650: 1080 1080 fbff fcff fbff fcff fdff fdff  ................
...
0002fe0: 0000 0000 0100 0100 ffff 0000 1080 1080  ................
0002ff0: 1080 1080 1080 1080 1080 1080 1080 1080  ................
0003000: 8888 8888 0100 0000 ffff ffff 0000 0000  ................

0x8010 is -32752 and 0x8888 is -30584.

The data set contains no large positive values (nothing in the range
0x1000-0x7fff).

The valuex 0x10 and 0x80 do remind me of the YUV values for black: Y =
0x10, U = 0x80, V = 0x80.  Maybe some video data is getting thrown in
with the audio?

Regards,
Andy

> -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;
> }
> 


--
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