4 Feb
2009
4 Feb
'09
4:02 p.m.
On Wed, 04 Feb 2009 13:09:37 +0100 Takashi Iwai tiwai@suse.de wrote:
At Wed, 4 Feb 2009 12:48:34 +0100, Hans-Christian Egtvedt wrote:
<snipp>
+static int atmel_ac97c_playback_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
+{
- struct atmel_ac97c *chip =
snd_pcm_substream_chip(substream);
- int retval;
- retval = snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params));
- if (retval)
return retval;
Should be a negative-check.
For some reason if I only check for < 0, then the buffer is not configured properly. Seems like the preallocation goes wrong for some reason.
Any pointers to why?
I do snd_pcm_new(), then snd_pcm_set_ops(), then snd_pcm_lib_preallocate_pages_for_all().
<snipp>
--
Best regards,
Hans-Christian Egtvedt