* AC'97 recording on AT91sam9263
@ 2008-05-21 12:50 Sedji Gaouaou
0 siblings, 0 replies; only message in thread
From: Sedji Gaouaou @ 2008-05-21 12:50 UTC (permalink / raw)
To: alsa-devel, linux-arm-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-21 12:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 12:50 AC'97 recording on AT91sam9263 Sedji Gaouaou
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.