All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 3/3] Add ALSA driver for Atmel AC97 controller
Date: Wed, 4 Feb 2009 16:02:14 +0100	[thread overview]
Message-ID: <20090204160214.33bb4e67@hcegtvedt> (raw)
In-Reply-To: <s5hd4dy9zem.wl%tiwai@suse.de>

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

  parent reply	other threads:[~2009-02-04 15:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04 11:48 [PATCH 0/3] Add AVR32 ALSA drivers Hans-Christian Egtvedt
2009-02-04 11:48 ` [PATCH 1/3] Add AVR32 ALSA drivers directory Hans-Christian Egtvedt
2009-02-04 11:48   ` [PATCH 2/3] Add ALSA driver for Atmel Audio Bitstream DAC Hans-Christian Egtvedt
2009-02-04 11:48     ` [PATCH 3/3] Add ALSA driver for Atmel AC97 controller Hans-Christian Egtvedt
2009-02-04 12:00       ` Mark Brown
2009-02-04 12:15         ` Hans-Christian Egtvedt
2009-02-04 12:51           ` Sedji Gaouaou
2009-02-04 13:01             ` Mark Brown
2009-02-04 13:03             ` Hans-Christian Egtvedt
2009-02-04 13:11               ` Sedji Gaouaou
2009-02-04 13:21                 ` Hans-Christian Egtvedt
2009-02-04 13:44                   ` Takashi Iwai
2009-02-04 14:28                     ` Sedji Gaouaou
2009-02-04 12:09       ` Takashi Iwai
2009-02-04 12:16         ` Hans-Christian Egtvedt
2009-02-04 15:02         ` Hans-Christian Egtvedt [this message]
2009-02-04 15:08           ` Takashi Iwai
2009-02-05  7:14       ` Hans-Christian Egtvedt
2009-02-04 12:00     ` [PATCH 2/3] Add ALSA driver for Atmel Audio Bitstream DAC Takashi Iwai
2009-02-04 12:18       ` Hans-Christian Egtvedt
2009-02-04 12:52         ` Takashi Iwai
2009-02-04 12:58           ` Hans-Christian Egtvedt
2009-02-04 12:02   ` [PATCH 1/3] Add AVR32 ALSA drivers directory Takashi Iwai
2009-02-04 12:11     ` Hans-Christian Egtvedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090204160214.33bb4e67@hcegtvedt \
    --to=hans-christian.egtvedt@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.