From: Sedji Gaouaou <sedji.gaouaou@atmel.com>
To: alsa-devel@alsa-project.org, linux-arm-kernel@lists.arm.linux.org.uk
Subject: AC'97 recording on AT91sam9263
Date: Wed, 21 May 2008 14:50:29 +0200 [thread overview]
Message-ID: <48341A95.3080902@atmel.com> (raw)
Hi,
I am trying to write the AC'97 driver(recording) and I encounter some
problems.
I would like to set up some constraints but if I do so I will have a seg
fault when running arecord.
here is my open function:
/* define the constraints */
static unsigned int rates[] = {
8000, 44100,
};
static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
.count = ARRAY_SIZE(rates),
.list = rates,
.mask = 0,
};
...
static int snd_at91_ac97_capture_open(struct snd_pcm_substream *substream)
{
at91_ac97_t *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
int err;
runtime->hw = snd_at91_ac97_capture_hw;
chip->capture_substream = substream;
chip->period = 0;
if ((err = snd_pcm_hw_constraint_list(runtime, 0,
SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates)) < 0)
return err;
snd_printd(KERN_DEBUG "%s : snd_at91_ac97_capture_open\n\r", driver_name);
return 0;
}
I have another problem if I try to set up some constraint on the format.
Indeed I do exactly the same as for the rate, but then it will fail in
aplay.c in the function set_params, returning the error message:"Broken
configuration for this PCM: no configuration available."
Do I miss something when trying to set up the constraints?
Is there any particular way for setting the format constraints?
Regards,
Sedji
reply other threads:[~2008-05-21 12:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48341A95.3080902@atmel.com \
--to=sedji.gaouaou@atmel.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
/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.