[alsa-devel] soft vol
Takashi Iwai
tiwai at suse.de
Mon May 14 10:32:28 CEST 2007
At Mon, 14 May 2007 10:22:32 +0200,
Michel Benoit wrote:
>
> >From a printk in the soc driver:
>
> SNDRV_CTL_IOCTL_ELEM_READ is 0xc2c85512
>
> Is that correct?
Right, it means that the struct is aligned differently on between
user- and kernel-spaces.
Could check the offset of each field, such as
printk("id = %d\n", offsetof(struct snd_ctl_elem_value, id));
printk("value = %d\n", offsetof(struct snd_ctl_elem_value, value));
printk("tstamp = %d\n", offsetof(struct snd_ctl_elem_value, tstamp));
printk("reserved = %d\n", offsetof(struct snd_ctl_elem_value, reserved));
for both kernel and user-spaces? I guess either it's a difference of
pointer alignment or time_spec definition.
Takashi
>
> On 5/11/07, Takashi Iwai <tiwai at suse.de> wrote:
> > At Fri, 11 May 2007 12:36:01 +0200,
> > Michel Benoit wrote:
> > >
> > > Hello
> > >
> > > Now that I have my pcm playback working with aplay with our at91 aSoc
> > > sound driver I would like to control the volume with softvol.
> > >
> > > I followed the instructions from
> > > http://alsa.opensrc.org/How_to_use_softvol_to_control_the_master_volume
> > > and I have the following asound.con file in /etc
> > >
> > > pcm.!default {
> > > type plug
> > > slave.pcm "softvol"
> > > }
> > >
> > > pcm.softvol {
> > > type softvol
> > > slave {
> > > pcm "plughw:0,0"
> > > }
> > > control {
> > > name "PCM volume"
> > > card 0
> > > }
> > > }
> > >
> > > When I play a wav file directly to the device it works fine:
> > >
> > > # aplay -Dplughw:0,0 Front_Center.wav
> > > Playing WAVE 'Front_Center.wav' : Signed 16 bit Little Endian, Rate
> > > 48000 Hz, Mono
> > >
> > > but when I try to use the default softvol device I get the following
> > > output (and no sound):
> > >
> > > # aplay Front_Center.wav
> > > Playing WAVE 'Front_Center.wav' : Signed 16 bit Little Endian, Rate
> > > 48000 Hz, Mono
> > > ALSA sound/core/control.c:1244: unknown ioctl = 0xc2c45512
> > > ALSA sound/core/control.c:1244: unknown ioctl = 0xc2c45512
> > > ALSA sound/core/control.c:1244: unknown ioctl = 0xc2c45512
> > > ALSA sound/core/control.c:1244: unknown ioctl = 0xc2c45512
> > > ALSA sound/core/control.c:1244: unknown ioctl = 0xc2c45512
> > > ...
> > >
> > > Does anyone have any ideas as to why this is happening?
> >
> > This should be SNDRV_CTL_IOCTL_ELEM_READ.
> >
> > Could you check which number this ioctl is in the kernel code?
> > e.g. try printk("0x%x\n", SNDRV_CTL_IOCTL_ELEM_READ) in kernel
> > and in alsa-lib, too.
> >
> >
> > Takashi
> >
>
More information about the Alsa-devel
mailing list