> Please, see to refine code in pcm_dmix.c. You cannot do it with your way.
> The refine means that it reduces given configuration and if no valid
> configuration for given parameter exists, then the result value has to be
> empty (or not set).
Okay, so, where I tried to do something like (not complete code)
snd_pcm_format_mask_t format_mask = { SND_PCM_FMTBIT_FLOAT };
snd_pcm_format_mask_t access_mask;
err = _snd_pcm_hw_param_set_mask(params, SND_PCM_HW_PARAM_FORMAT,
&format_mask);
snd_pcm_access_mask_none(&access_mask);
snd_pcm_access_mask_set(&access_mask, SND_PCM_ACCESS_MMAP_INTERLEAVED);
snd_pcm_access_mask_set(&access_mask, SND_PCM_ACCESS_MMAP_NONINTERLEAVED);
err = _snd_pcm_hw_param_set_mask(params, SND_PCM_HW_PARAM_ACCESS,
&access_mask);
err = _snd_pcm_hw_param_set_minmax(params, SND_PCM_HW_PARAM_RATE,
44100, 0,
44100, 1);
(which does seem to work though!)
I should do something like:
static snd_mask_t access = { .bits = {
(1<<SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) |
(1<<SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED) |
(1<<SNDRV_PCM_ACCESS_RW_INTERLEAVED) |
(1<<SNDRV_PCM_ACCESS_RW_NONINTERLEAVED),
0, 0, 0 } };
snd_interval_t t;
snd_pcm_format_mask_t format_mask = { SND_PCM_FMTBIT_FLOAT };
t.openmin = 0;
t.openmax = 0;
t.empty = 0;
t.integer = 1;
t.min = 44100;
t.max = 44100;
snd_mask_refine(hw_param_mask(params, SND_PCM_HW_PARAM_ACCESS), &access);
snd_mask_refine(hw_param_mask(params, SND_PCM_HW_PARAM_FORMAT),&format_mask);
snd_interval_refine(hw_param_interval(params,SND_PCM_HW_PARAM_RATE),&t);
?
This doesn't work for the rate though:
aplay: interval_inline.h:79: snd_interval_max: Assertion `!snd_interval_empty(i)'
failed
What am I doing wrong?
What I have now working is a plugin the has no slave and that writes the data to file
(later
this will be jack, now it's just for testing), in refined the format and rate.
Maarten
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel