Two things to try...
1) Use /dev/snd/pcmC1D1p instead of "c"... Make any difference?
2) Try "-c 2"... My card only supports stereo audio.. But its at least
nice enough to report that as well so the new alsa.c detects it and
override to stereo mode. Perhaps yours is mistakenly reporting it
supports mono.
Chris
On Tue, Oct 26, 2004 at 07:23:46PM +0200, Juan Domenech wrote:
> Chris,
>
> The problem persists. I've compiled the last version using CVS. Here are the tests:
>
> [root@... root]# sox -V -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> sox: ALSA drive doesn't support (null) byte. Changing to signed bytes.
> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
>
> [root@... root]# sox -V -w -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> sox: ALSA drive doesn't support (null) byte. Changin to signed words.
> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
>
> [root@... root]# sox -V -sw -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
>
> [root@... root]# sox -V -sw -c 1 -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
>
> [root@... root]# sox -V -sw -c 1 -r 448000 -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
>
>
>
> Don't worry. I have a very peculiar sound card and I should try another approach. I'll try to use a program from a friend to do something like this:
>
> err=snd_pcm_hw_params_set_access(record_handle,hw_params,SND_PCM_ACCESS_RW_INTERLEAVED);
> if(err<0){printf("ADC cannot set access type (%s)\n",snd_strerror (err));exit (1);}
>
> err=snd_pcm_hw_params_set_format(record_handle,hw_params,SND_PCM_FORMAT_S16_LE);
> if(err<0){printf("ADC cannot set sample format (%s)\n",snd_strerror (err));exit (1);}
>
> And so on. And find where the problem is.
>
> I'll keep the list posted.
>
> Thanks.
>
>
> Juan Domenech
>
>
> ----- Original Message -----
> From: "Chris Bagwell" <chris@...>
> To: "Juan Domenech" <jdf@...>
> Cc: "Jimen Ching" <jching@...>; <sox-users@...>
> Sent: Sunday, October 24, 2004 2:58 AM
> Subject: Re: [SoX-users] SoX under ALSA and the Bt878a
>
>
> > Jaun,
> >
> > If your comfortable with CVS, could you download the latest version
> > of sox and try it out? I think it will probably work with
> > both cards now.
> >
> > As Jimen said though, the sample rate your using may be an issue.
> >
> > Chris
> >
> > On Thu, Oct 21, 2004 at 09:15:41PM +0200, Juan Domenech wrote:
> >> Hi,
> >>
> >> Here you have more tests:
> >>
> >> SoX with ALSA and my old "Creative ViBRA16C pnp". Works perfect.
> >>
> >> [root@... root]# sox -V -w -c 1 -r 44100 -t alsa /dev/snd/pcmC0D0c -t .wav test.wav
> >> sox: Input file /dev/snd/pcmC0D0c: using sample rate 44100
> >> size shorts, encoding signed (2's complement), 1 channel
> >> sox: Input file /dev/snd/pcmC0D0c: comment "/dev/snd/pcmC0D0c"
> >>
> >> sox: Writing Wave file: Microsoft PCM format, 1 channel, 44100 samp/sec
> >> sox: 88200 byte/sec, 2 block align, 16 bits/samp
> >> sox: Output file test.wav: using sample rate 44100
> >> size shorts, encoding signed (2's complement), 1 channel
> >> sox: Output file: comment "/dev/snd/pcmC0D0c"
> >>
> >> sox: Finished writing Wave file, 196608 data bytes 98304 samples
> >>
> >>
> >>
> >> But there is no way to make the Bt878a to work.
> >>
> >> [root@... root]# sox -V -b -c 1 -r 448000 -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> >> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
> >>
> >> [root@... root]# sox -V -w -c 1 -r 448000 -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> >> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
> >>
> >> [root@... root]# sox -V -w -c 2 -r 448000 -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> >> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
> >>
> >>
> >> And default sample rate:
> >>
> >> [root@... root]# sox -V -w -c 1 -t alsa /dev/snd/pcmC1D1c -t .wav test.wav
> >> sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
> >>
> >>
> >> The conclusion is clear: There is some problem with the Bt878 driver. It's strange because with the native arecord utility works well.
> >>
> >> I'll try to activate some kind of debug into the driver.
> >>
> >> I'll keep you posted.
> >>
> >> Bye.
> >>
> >>
> >>
> >> Juan Domenech
> >>
> >>
> >> ----- Original Message -----
> >> From: "Chris Bagwell" <chris@...>
> >> To: "Jimen Ching" <jching@...>
> >> Cc: "Juan Domenech" <jdf@...>; <sox-users@...>
> >> Sent: Tuesday, October 19, 2004 4:02 AM
> >> Subject: Re: [SoX-users] SoX under ALSA and the Bt878a
> >>
> >>
> >> > On this topic, I just submited patches to CVS to define __user and
> >> > __kernel as nothing.
> >> >
> >> > Now I can compile alsa.c under Fedora Core 3 Test 3.
> >> >
> >> > So I then tried to run "sox monkey.wav -s -w -r 44100 -t alsa
> >> > /dev/pcmC0D0p". I also get the ioctl fail with 22 (invalid parameter).
> >> >
> >> > The OSS emulation works fine to /dev/dsp...
> >> > Hmmm... Not sure what the problem is.
> >> >
> >> > Unfortunetly, if its like the OSS driver, the only real way to figure
> >> > out the problem is to split up the setting of each parameter to
> >> > seperate ioctl()'s to see whats failing (ie. set signed words in
> >> > one, rate in another, etc). Not sure if ALSA lends it self to
> >> > that very well. I'll leave that to another day.
> >> >
> >> > Chris
> >> >
> >> > On Sun, Oct 17, 2004 at 04:34:10PM -1000, Jimen Ching wrote:
> >> >> On Sat, 16 Oct 2004, Juan Domenech wrote:
> >> >> >sox: Failed reading /dev/snd/pcmC1D1c: ioctl operation failed 22
> >> >> >
> >> >> >You can read the details at the bottom of this page
> >> >> >http://www.domenech.org/bt878a-adc/alsa-e.htm
> >> >>
> >> >> ugh, should that be:
> >> >>
> >> >> sox -V -r 44800 -s -w -t alsa /dev/snd/pcmC1D1c -t wav test.wav
> >> >>
> >> >> Note the rate is 44.8k and not 448k? And signed word is "-s -w" not
> >> >> "-sw". The '-t .wav' or even '-t wav' is optional, since sox should be
> >> >> able to detect the output format from the filename extension.
> >> >>
> >> >> Let me know if this command line works...
> >> >>
> >> >> --jc
> >> >> --
> >> >> Jimen Ching (WH6BRR) jching@... wh6brr@...
> >> >>
> >> >>
> >> >> -------------------------------------------------------
> >> >> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> >> >> Use IT products in your business? Tell us what you think of them. Give us
> >> >> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> >> >> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> >> >> _______________________________________________
> >> >> Sox-users mailing list
> >> >> Sox-users@...
> >> >> https://lists.sourceforge.net/lists/listinfo/sox-users
> >> >
> >> > --
> >> > Chris Bagwell <chris at cnpbagwell dot com> | Frisco, TX
> >> > http://www.cnpbagwell.com/ | USA
> >> >
> > --
> > Chris Bagwell <chris at cnpbagwell dot com> | Frisco, TX
> > http://www.cnpbagwell.com/ | USA
> >
--
Chris Bagwell <chris at cnpbagwell dot com> | Frisco, TX
http://www.cnpbagwell.com/ | USA
|