* trace PCM data from usb bus to alsa lib
@ 2009-06-17 7:25 ZeroCluo
2009-06-17 8:01 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: ZeroCluo @ 2009-06-17 7:25 UTC (permalink / raw)
To: alsa-devel
Hi
I am trying to trace the Audio data from usb bus.
in kernel:
dump data in retire_capture_urb() ,found data format is like:
AABB 0000 CCDD 0000 ;
but in alsa library ,
dump data in snd_pcm_mmap_begin(),the "0000" is cut,only "AABB CCDD",
Do you know when and where those "0000" is cut?
btw,use mmap method map dma_area to user space; and use snd_pcm_readi to get
audio data;
Thank you very very much.
Best Regards,
Zero
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: trace PCM data from usb bus to alsa lib
2009-06-17 7:25 trace PCM data from usb bus to alsa lib ZeroCluo
@ 2009-06-17 8:01 ` Takashi Iwai
[not found] ` <34ae6efa0906170110u30dbe2deg58cf34b73a838116@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2009-06-17 8:01 UTC (permalink / raw)
To: ZeroCluo; +Cc: alsa-devel
At Wed, 17 Jun 2009 07:25:25 +0000 (UTC),
ZeroCluo wrote:
>
> Hi
>
> I am trying to trace the Audio data from usb bus.
> in kernel:
> dump data in retire_capture_urb() ,found data format is like:
> AABB 0000 CCDD 0000 ;
>
> but in alsa library ,
> dump data in snd_pcm_mmap_begin(),the "0000" is cut,only "AABB CCDD",
>
> Do you know when and where those "0000" is cut?
Are you using the native format that the hardware runs?
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: trace PCM data from usb bus to alsa lib
[not found] ` <34ae6efa0906170110u30dbe2deg58cf34b73a838116@mail.gmail.com>
@ 2009-06-17 8:18 ` Takashi Iwai
2009-06-17 8:33 ` ZeroCluo
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2009-06-17 8:18 UTC (permalink / raw)
To: Zero Luo; +Cc: alsa-devel
At Wed, 17 Jun 2009 16:10:26 +0800,
Zero Luo wrote:
>
> Dear Takashi,
>
> Data from usb dongle is 16K*16 bit PCM data.
And what is the format and channels you are using in alsa-lib?
alsa-lib itself can convert formats and channels automatically if needed.
Takashi
> 2009/6/17, Takashi Iwai <tiwai@suse.de>:
>
> At Wed, 17 Jun 2009 07:25:25 +0000 (UTC),
> ZeroCluo wrote:
> >
> > Hi
> >
> > I am trying to trace the Audio data from usb bus.
> > in kernel:
> > dump data in retire_capture_urb() ,found data format is like:
> > AABB 0000 CCDD 0000 ;
> >
> > but in alsa library ,
> > dump data in snd_pcm_mmap_begin(),the "0000" is cut,only "AABB CCDD",
> >
> > Do you know when and where those "0000" is cut?
>
> Are you using the native format that the hardware runs?
>
> Takashi
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: trace PCM data from usb bus to alsa lib
2009-06-17 8:18 ` Takashi Iwai
@ 2009-06-17 8:33 ` ZeroCluo
2009-06-17 15:52 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: ZeroCluo @ 2009-06-17 8:33 UTC (permalink / raw)
To: alsa-devel
Takashi Iwai <tiwai <at> suse.de> writes:
>
> At Wed, 17 Jun 2009 16:10:26 +0800,
> Zero Luo wrote:
> >
> > Dear Takashi,
> >
> > Data from usb dongle is 16K*16 bit PCM data.
>
> And what is the format and channels you are using in alsa-lib?
> alsa-lib itself can convert formats and channels automatically if needed.
>
> Takashi
In alsa-lib ,I set data format as 8K * mulaw .
hwparams.format = SND_PCM_FORMAT_MU_LAW;
hwparams.rate = 8000;
hwparams.channels = 1;
Yes,indeed alsa-lib help to convert formats.But before alsa-lib convert pcm
data to mulaw,I dumped the src data in snd_pcm_mulaw_encode() which already
has no "0000" .
Zero
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: trace PCM data from usb bus to alsa lib
2009-06-17 8:33 ` ZeroCluo
@ 2009-06-17 15:52 ` Takashi Iwai
2009-06-18 1:52 ` ZeroCluo
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2009-06-17 15:52 UTC (permalink / raw)
To: ZeroCluo; +Cc: alsa-devel
At Wed, 17 Jun 2009 08:33:15 +0000 (UTC),
ZeroCluo wrote:
>
> Takashi Iwai <tiwai <at> suse.de> writes:
>
> >
> > At Wed, 17 Jun 2009 16:10:26 +0800,
> > Zero Luo wrote:
> > >
> > > Dear Takashi,
> > >
> > > Data from usb dongle is 16K*16 bit PCM data.
> >
> > And what is the format and channels you are using in alsa-lib?
> > alsa-lib itself can convert formats and channels automatically if needed.
> >
> > Takashi
>
>
> In alsa-lib ,I set data format as 8K * mulaw .
> hwparams.format = SND_PCM_FORMAT_MU_LAW;
> hwparams.rate = 8000;
> hwparams.channels = 1;
> Yes,indeed alsa-lib help to convert formats.But before alsa-lib convert pcm
> data to mulaw,I dumped the src data in snd_pcm_mulaw_encode() which already
> has no "0000" .
Well, another question is whether the output result is correct.
Did you get broken output or so?
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: trace PCM data from usb bus to alsa lib
2009-06-17 15:52 ` Takashi Iwai
@ 2009-06-18 1:52 ` ZeroCluo
0 siblings, 0 replies; 6+ messages in thread
From: ZeroCluo @ 2009-06-18 1:52 UTC (permalink / raw)
To: alsa-devel
> Well, another question is whether the output result is correct.
> Did you get broken output or so?
>
> Takashi
>
First,thanks for your reply.
Output should be correct.I can hear smooth voice. It real confuse me...
Zero
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-18 1:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 7:25 trace PCM data from usb bus to alsa lib ZeroCluo
2009-06-17 8:01 ` Takashi Iwai
[not found] ` <34ae6efa0906170110u30dbe2deg58cf34b73a838116@mail.gmail.com>
2009-06-17 8:18 ` Takashi Iwai
2009-06-17 8:33 ` ZeroCluo
2009-06-17 15:52 ` Takashi Iwai
2009-06-18 1:52 ` ZeroCluo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.