[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Protux-devel] snd_pcm_hw_params_set_format returns: invalid format
From: |
Remon Sijrier |
Subject: |
[Protux-devel] snd_pcm_hw_params_set_format returns: invalid format |
Date: |
Thu, 5 Jun 2003 16:50:51 +0200 |
User-agent: |
KMail/1.5.1 |
hi all,
Nice to see there's active develepment again on protux. I'm very interested in
this program, and like the idea behind the jog mouse board. I've seen it only
on a few apps. and it gives an amazing speedup in processing your work.
I send a few weeks ago a mail to this list about some bugs. After the
suggestion to wait until Luciano was back online and commited his stuff to
CVS, I compiled the CVS this week (today actually) but there is some weird
problem besided the problems I had already.
The new MustuxAudioDeviceMapper (couldn't that be a longer name? :) ) isn't
working as expected. I get the following error:
** Error in int MustuxAudioDeviceMapper::Bus::open(int, int, int, bool)
Invalid sample format to bus ICE1712 - 1st OUT (hw:0,0) : Invalid argument
And this is the corresponding code:
r = snd_pcm_hw_params_set_format (pcmHandle, hwparams,
SND_PCM_FORMAT_S16_LE);
if (r < 0)
{
PERROR("Invalid sample format to bus %s :
%s",cBusFullReference,snd_strerror(r));
goto ALSA_ERROR_AFTER_OPEN_AND_HWPARAMS_ALLOCATION;
}
(I got this error also when the "supports" metod was called, so I returned 1
to get rid of it, and see if the rest of the programm was working fine)
If I set the format to SND_PCM_FORMAT_S32_LE it works, but them I'm playing 16
bits audio in a 32 bit way? Really ugly sound.
Also the setting of the channels isn't working:
// set the count of channels
r = snd_pcm_hw_params_set_channels(pcmHandle, hwparams, 10);
if (r < 0)
10 = channels should be 2.
But if I change 10 into channels (back to the original variable) I get a
segfault.
This are the actual settings after I get the "invalid format" error:
ACCESS: RW_INTERLEAVED
FORMAT: S32_LE
SUBFORMAT: STD
SAMPLE_BITS: 32
FRAME_BITS: 320
CHANNELS: 10
RATE: [8000 96000]
PERIOD_TIME: (20 409500]
PERIOD_SIZE: [2 3276]
PERIOD_BYTES: [80 131040]
PERIODS: [1 1024]
BUFFER_TIME: (20 819125]
BUFFER_SIZE: [2 6553]
BUFFER_BYTES: [80 262120]
TICK_TIME: 10000
As you see, its works only if I set format and channels to the values listed
above, but it must be possible to set it to 16 bits and 2 channels?
I looked into some other code, for example alsaplayer, and it uses exactly the
same statements as MADM. With this difference, alsaplayer plays sound, and
protux: segfaults (set_channel); invalid format (set_format)
I looked at it several hours but I don't see anything what could be wrong.
I tried also to add:
#include <alsa/asoundlib.h>
Got some errors, fixed it (actually I disabled some snd_pcm_hw_params_get
which produced the errors.) but problem remains.
I really dont' know what to do about it. Hopefully you can help me out. I'll
wait sending the other problems after this one is fixed :)
(just joking)
Greetings,
Remon
- [Protux-devel] --enable-debug seems not to be working, Luciano Giordana, 2003/06/04
- Re: [Protux-devel] --enable-debug seems not to be working, Martin Herren, 2003/06/04
- Re: [Protux-devel] --enable-debug seems not to be working, Luciano Giordana, 2003/06/04
- [Protux-devel] snd_pcm_hw_params_set_format returns: invalid format,
Remon Sijrier <=
- Re: [Protux-devel] snd_pcm_hw_params_set_format returns: invalid format, Luciano Giordana, 2003/06/05
- Re: [Protux-devel] snd_pcm_hw_params_set_format returns: invalid format, Luciano Giordana, 2003/06/05
- Re: [Protux-devel] snd_pcm_hw_params_set_format returns: invalid format, Remon Sijrier, 2003/06/05
- Re: [Protux-devel] snd_pcm_hw_params_set_format returns: invalid format, Remon Sijrier, 2003/06/06
- Re: [Protux-devel] snd_pcm_hw_params_set_format returns: invalid format, rsff, 2003/06/06
- Re: [Protux-devel] snd_pcm_hw_params_set_format returns: invalid format, Luciano Giordana, 2003/06/06