From: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.de>
Cc: Raymond Yau <superquad.vortex2@gmail.com>,
ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: amixer cget :Assertion `ctl && info && (info->id.name[0] || info->id.numid)' failed. Aborted
Date: Wed, 05 Oct 2011 09:59:42 +0200 [thread overview]
Message-ID: <4E8C0E6E.2000700@perex.cz> (raw)
In-Reply-To: <s5hobxvyj78.wl%tiwai@suse.de>
Date 5.10.2011 09:46, Takashi Iwai wrote:
> At Wed, 5 Oct 2011 15:25:44 +0800,
> Raymond Yau wrote:
>>
>> 2011/10/3 Takashi Iwai <tiwai@suse.de>:
>>> At Sat, 1 Oct 2011 11:30:44 +0800,
>>> Raymond Yau wrote:
>>>>
>>>> There is assertion when specify iface=PCM or iface=PCM,name='' when
>>>> using amixer -c0 cget
>>>>
>>>> according to the synthax
>>>>
>>>> [[iface=<iface>,][name='name',][index=<index>,][device=<device>,][subdevice=<subdevice>]]|[numid=<numid>]
>>>>
>>>>
>>>> amixer -c0 cget iface=PCM
>>>> amixer: control.c:258: snd_ctl_elem_info: Assertion `ctl && info &&
>>>> (info->id.name[0] || info->id.numid)' failed.
>>>> Aborted
>>>>
>>>> amixer -c0 cget iface=PCM,name=''
>>>> amixer: control.c:258: snd_ctl_elem_info: Assertion `ctl && info &&
>>>> (info->id.name[0] || info->id.numid)' failed.
>>>> Aborted
>>>
>>> So, the empty string isn't checked before assert(). It's bad.
>>> It must be easy to fix. Care to create and send a patch?
>>>
>>>
>>
>> The syntax seem also wrong.
>>
>> [[iface=<iface>,][name='name',][index=<index>,][device=<device>,][subdevice=subdevice>]]|[numid=<numid>]
>>
>>
>> it should be
>> [numid=<numid>] |
>> [[iface=<iface>,name='name'][,index=<index>][,device=<device>]] |
>> [[iface=<iface>,name='name'][,device=<device>][,subdevice=<subdevice>]]
>>
>> since you cannot specify index and subdevice at the same time
>
> The index and subdevice are different things.
> Typically, the index is set > 0 when multiple elements with the same
> iface and name are present. The subdevice is rather specification of
> the device itself, e.g. PCM substream number.
The correct syntax should be:
[[iface=<iface>,]name='name'[,index=<index>,][device=<device>,][subdevice=subdevice>]]
OR numid=<numid>
The name or numid is mandatory.
Jaroslav
--
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.
next prev parent reply other threads:[~2011-10-05 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-01 3:30 amixer cget :Assertion `ctl && info && (info->id.name[0] || info->id.numid)' failed. Aborted Raymond Yau
2011-10-03 13:49 ` Takashi Iwai
2011-10-05 7:25 ` Raymond Yau
2011-10-05 7:46 ` Takashi Iwai
2011-10-05 7:59 ` Jaroslav Kysela [this message]
2011-10-10 1:12 ` Raymond Yau
2011-10-10 12:29 ` Takashi Iwai
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=4E8C0E6E.2000700@perex.cz \
--to=perex@perex.cz \
--cc=alsa-devel@alsa-project.org \
--cc=superquad.vortex2@gmail.com \
--cc=tiwai@suse.de \
/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.