From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: trace PCM data from usb bus to alsa lib Date: Wed, 17 Jun 2009 17:52:22 +0200 Message-ID: References: <34ae6efa0906170110u30dbe2deg58cf34b73a838116@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 4B75524341 for ; Wed, 17 Jun 2009 17:52:22 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: ZeroCluo Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 17 Jun 2009 08:33:15 +0000 (UTC), ZeroCluo wrote: > = > Takashi Iwai suse.de> writes: > = > > = > > At Wed, 17 Jun 2009 16:10:26 +0800, > > Zero Luo wrote: > > > = > > > Dear Takashi, > > > =A0 > > > =A0=A0 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 neede= d. > > = > > Takashi > = > = > In alsa-lib ,I set data format as 8K * mulaw . > hwparams.format =3D SND_PCM_FORMAT_MU_LAW; > hwparams.rate =3D 8000; > hwparams.channels =3D 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 alrea= dy = > has no "0000" . Well, another question is whether the output result is correct. Did you get broken output or so? Takashi