Re: soft vol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >
> > >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.
>
>

The output from
       printk("0x%x\n", SNDRV_CTL_IOCTL_ELEM_READ);
       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));

in the kernel driver is

0xc2c85512
id = 0
value = 72
tstamp = 584
reserved = 592

and in the pcm test program the ouput of
     printk("0x%x\n", SNDRV_CTL_IOCTL_ELEM_READ);
is

0xc2c45512


What is the difference?  Which version of alsa is used/expected in the kernel?
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux