Re: "alsactl store" fails to save Echo Gina3G mixer

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

 



On Aug 29 2017 12:46, S. Christian Collins wrote:
On 08/28/2017 10:33 PM, Takashi Sakamoto wrote:

Would you get output from below command line for your Gina 3G?

$ amixer scontrols

The output of "amixer -c 1 scontrols" is attached to this e-mail as "scontrols.txt".

And typically state data is stored into '/var/lib/alsa/asound.state' as a default. For my information, could you disclose it if possible?

Yes, it is also attached to this e-mail. The asound.state file was last modified on March 26th. I remember that I used to not get the error when using "alsactl store", so perhaps an update caused this issue to appear around that time?

$ alsactl -f ~/asound1.state store 1
(alsa-utils:alsactl/alsactl.c)
main()
  (alsa-utils:alsactl/state.c)
->save_state()
  ->get_controls()
    ->get_control()
      snd_ctl_elem_info(info)
      count = snd_ctl_elem_info_get_count(info)
      for (i = 0; i < count; i++)
        snd_ctl_elem_value_get_integer(ctl, i)

I guess that 'snd-echo3g.ko' returns value greater than 128 in a call graph of 'snd_ctl_elem_info_get_count()', then a call of 'snd_ctl_elem_value_get_integer()' hits an assertion in the function.

A patch mentioned by Mark Hills (a commit 275353bb684e 'ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members') is fairly valid in a logical design of ALSA control protocol/interface. In detail, please refer to my post[1].

Some of ALSA drivers for PCI cards produced by Echo Audio potentially have problems which I mentioned in the post. They can cause buffer-over-run over 'struct snd_ctl_elem_value.value' in user space. The drivers should be going to fix.

I wrote a small program to validate dimension information for your card[2]. Would you please execute it? Like:

$ gcc -o ./test ./alsa-ctl-dimen-check.c
$ ./test /dev/snd/controlC[0-9]

An argument is required for a path of special file for ALSA control character device for your sound card.

[1]  [PATCH 0/3] ALSA: add dimension information validator
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-June/109811.html
[2] alsa-ctl-dimen-check.c
https://gist.github.com/takaswie/cd670ee88b7fd25c68780610ad8ad54f


Regards

Takashi Sakamoto
_______________________________________________
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