Re: [LAU] [alsa-devel] USB device gives wrong data?

From: william estrada <MrUmunhum@email-addr-hidden>
Date: Mon Oct 22 2007 - 19:58:38 EEST

Clemens,

   I respect your options and appreciate your time, but from what I have read,
for a U8 format, silence is represented by a x'7F'. Do you have a source for
your option?

   In pcm_misc.c seems to support your statement:

> static struct pcm_format_data pcm_formats[SNDRV_PCM_FORMAT_LAST+1] = {
.
.
> [SNDRV_PCM_FORMAT_U8] = {
> .width = 8, .phys = 8, .le = -1, .signd = 0,
> .silence = { 0x80 },

   So I guess I need to make my filter flexible to match the current hardware
device driver?

   How would you filter out noise? I am new to these interfaces and would like
to find a good place to get more information about filters, noise, etc. Any
URLs that you could recommend?

   Thanks again for your time.

William Estrada
MrUmunhum@email-addr-hidden
Mt-Umunhum-Wireless.net ( http://Mt-Umunhum-Wireless.net )
Ymessenger: MrUmunhum

Clemens Ladisch wrote:
> william estrada wrote:
>> I think I have found a problem with the USB sound driver? It appears
>> that the current drive returns a x'81' for silence but it should be a
>> x'7f'.
>
> The USB audio driver returns whatever data is sent by the device
>
>> When I use my laptop's sound device and record without a mic, I get
>> a file full of x'7f's. If I do the same with my cheap-o USB device
>> I get a file full of x'81's.
>
> For unsigned 8-bit samples, silence is x'80'.
>
> Apparently, both devices have some DC offset and are quite noisy.
>
>> I have written a recording program that I have a 'silence' filter
>> that filters out segments of dead air. It works with the laptop's
>> sound device but not the USB device. The filter works by remove
>> x'7f's after allowing a selectable amount.
>
> Your filter should be able to detect silence even when noise is present.
>
>> Sorry for the multiple posting, not sure where is should have gone.
>
> The the linux-audio-dev list, of course. ;-)
>
>
> Regards,
> Clemens
>
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Mon Oct 22 20:15:03 2007

This archive was generated by hypermail 2.1.8 : Mon Oct 22 2007 - 20:15:03 EEST