Quattro woes or: What does "SNDRV_PCM_IOCTL_START failed" mean?
Hallo,
I have to apologize first for asking a probably totally ignorant question, but I really have no clue of ALSA-programming :(
But I need/want to get Pd running on my Laptop with a Quattro USB for the LAD conference next weekend, and this requires, that I somehow debug what goes wrong in Pd with ALSA.
I keep getting the following error, when starting Pd in ALSA mode with "hw:0,0" or any other ALSA device (like the ones Patrick set up in his .asoundrc on alsa-project.org):
ALSA lib pcm_hw:454(snd_pcm_hw_start) SNDRV_PCM_IOCTL_START failed:
Broken pipe
Responsible for ALSA in Pd is the file s_linux.c, that can be seen at our sourceforge-CVS:
It obviously fails somewhere around:
if (outchans)
{
err = snd_pcm_start(alsa_device.outhandle);
check_error(err, "snd_pcm_start");
}Now, what makes this the real problem, is that the same code works on another machine just fine, all with alsa-0.9rc7 and the same binary and the same source.
Because of that I somehow doubt (but cannot judge it) that the reason is a wrong handling of the asound API in Pd's s_linux.c, but something else, something machine dependent. Also on both machines, ALSA in general is working fine, I can play music with alsaplayer and all that.
So now I'm quite clueless with this. Maybe someone here can shed a light on the question:
What are typical reasons for snd_pcm_start failing this way?
Thank you in advance.
Regards,
Signature · 7 lines
Frank Barknecht _ ______footils.org__ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
At Mon, 10 Mar 2003 23:33:22 +0100,
Quoted 10 lines · Frank Barknecht
Hallo,
I have to apologize first for asking a probably totally ignorant question, but I really have no clue of ALSA-programming :(
But I need/want to get Pd running on my Laptop with a Quattro USB for the LAD conference next weekend, and this requires, that I somehow debug what goes wrong in Pd with ALSA.
Quoted 6 lines
I keep getting the following error, when starting Pd in ALSA mode with "hw:0,0" or any other ALSA device (like the ones Patrick set up in his .asoundrc on alsa-project.org):
ALSA lib pcm_hw:454(snd_pcm_hw_start)
SNDRV_PCM_IOCTL_STARTfailed:
Broken pipe
do you see any kernel message?
if the start fails in the pcm trigger callback, usb-audio driver should show some error message there.
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Hallo,
Quoted 8 lines · Takashi Iwai hat gesagt: // Takashi Iwai wrote:
At Mon, 10 Mar 2003 23:33:22 +0100,
Quoted 2 lines · Frank Barknecht
ALSA lib pcm_hw:454(snd_pcm_hw_start)
SNDRV_PCM_IOCTL_STARTfailed:
Broken pipedo you see any kernel message?
if the start fails in the pcm trigger callback, usb-audio driver should show some error message there.
No, there only are the usual (de-)registering messages regarding snd-usb-audio. The only difference between my notebook and the laptop has been the kernel-version. Just 5 minutes ago I downgraded the notebook's kernel to 2.4.18 and now the error message went away! I'm currently still getting a lot of clicks, that probrably are caused by some wrong period settings in my application, but in general it is fine. For example "jackd -d alsa -d hw:0 -n 2" clicks, but "-n 3" is smooth.
I was using the Debian kernel 2.4.20 and also the Debian package of ALSA. I remember now, that the Debian maintainers send a bunch of USB-audio related patches. Maybe it's just Debian, that is broken??
Anyway, I can live with 2.4.18 for now, thank you for the help. Now on to ALSA 1.0 ;)
ciao
Signature · 7 lines
Frank Barknecht _ ______footils.org__ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
At Tue, 11 Mar 2003 11:32:09 +0100,
Quoted 13 lines · Frank Barknecht
Hallo,
Quoted 8 lines · Takashi Iwai hat gesagt: // Takashi Iwai wrote:
At Mon, 10 Mar 2003 23:33:22 +0100,
Quoted 2 lines · Frank Barknecht
ALSA lib pcm_hw:454(snd_pcm_hw_start)
SNDRV_PCM_IOCTL_STARTfailed:
Broken pipedo you see any kernel message?
if the start fails in the pcm trigger callback, usb-audio driver should show some error message there.
Quoted 8 lines
No, there only are the usual (de-)registering messages regarding snd-usb-audio. The only difference between my notebook and the laptop has been the kernel-version. Just 5 minutes ago I downgraded the notebook's kernel to 2.4.18 and now the error message went away! I'm currently still getting a lot of clicks, that probrably are caused by some wrong period settings in my application, but in general it is fine. For example "jackd -d alsa -d hw:0 -n 2" clicks, but "-n 3" is smooth.
make sure that you starting the jack with 48kHz and the period size aligned to 48, such as 48, 96, 192...
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Hallo,
Quoted 2 lines · Takashi Iwai hat gesagt: // Takashi Iwai wrote:
make sure that you starting the jack with 48kHz and the period size aligned to 48, such as 48, 96, 192...
Sorry, but I do not understand this fully. First, I'd rather like to run at 44.1 kHz, because that's a bit less computation for the softsynth I'm using. Will this lead to problems? I can live with a bit higher latency.
Second: the alsa driver of jack has these options:
alsa PCM driver args:
-d alsa-pcm-name (default: default)
-r sample-rate (default: 48kHz)
-p frames-per-period (default: 1024)
-n periods-per-hardware-buffer (default: 2)
I had to run with "-n 3", with "-n 2" jack wouldn't start.
The period size you mentioned must be "-p frames-per-period", if I'm right?
So if running with 44.1 kHz, should I use something like "-p 1025" where 41*25 = 1025?
But this doesn't work with Pd, which expects powers of 2...
ciao
Signature · 8 lines
Frank Barknecht _ ______footils.org__ ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
Quoted 1 line
But this doesn't work with Pd, which expects powers of 2...
i suggest you try to find an "ALSA-native" configuration that Pd and your quattro *do* work with, then we can map that to JACK.
--p
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hallo,
Quoted 4 lines · Paul Davis hat gesagt: // Paul Davis wrote:
Quoted 1 line
But this doesn't work with Pd, which expects powers of 2...
i suggest you try to find an "ALSA-native" configuration that Pd and your quattro *do* work with, then we can map that to JACK.
Well, jack was a workaround because I couldn't get Pd to work ALSA-natively in the first place, while the Jack-solution now works. In fact, I just 0 minutes ago found a working Pd solution as well, by taking Takashi's tip to run at 48000 Hz at work with Pd. And voila, now Pd works with the Quattro...
It only required downgrading the kernel and playing (a lot) with all those parameters, Jack (as I wrote on jack-devel) also had strange problems on 2.4.20 that went away on 2.4.18, even without Pd involved.
Best Regards,
Signature · 8 lines
Frank Barknecht _ ______footils.org__ ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en