* softvol plug-in dependancies?
@ 2008-05-10 19:59 Simon Dunn
2008-05-16 14:41 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Simon Dunn @ 2008-05-10 19:59 UTC (permalink / raw)
To: alsa-devel
Hi Guys
The softvol plug-in, are there any pre-requisites or dependancies
to using this? I've tried various entries in the /etc/asound.conf
configuration file all with the same result.
I can see the control in alsamixer, once I've run the speaker-test
through it, but cannot adjust any settings. Trying to run 'alsactl
store 0' results in this error :
.
alsactl: control.c:2437: snd_ctl_elem_value_get_integer: Assertion `idx <
sizeof
(obj->value.integer.value) / sizeof(obj->value.integer.value[0])' failed.
Aborted
.
Curiously using amixer the device is listed but its properties are
displayed like this
.
Simple mixer control 'PCM Vol',0
Capabilities: volume
Playback channels: Front Left - Front Right - Rear Left - Rear Right -
Front C
enter - Woofer - Side Left - Side Right - Rear Center - ? - ? - ? - ? - ?
- ? -
? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ?
Capture channels: Front Left - Front Right - Rear Left - Rear Right -
Front Ce
nter - Woofer - Side Left - Side Right - Rear Center - ? - ? - ? - ? - ? -
? - ?
- ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ?
Limits: 0 - 0
Front Left: 0 [0%]
Front Right: 0 [0%]
Rear Left: 0 [0%]
Rear Right: 0 [0%]
Front Center: 0 [0%]
Woofer: 0 [0%]
Side Left: 0 [0%]
Side Right: 0 [0%]
Rear Center: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
?: 0 [0%]
Any clues as to what's going on here would be much appreciated before
I have to start dissecting the library.
TIA for any hints
Simon
--
Simon Dunn, Software Engineer
MPC Data Limited
e-mail: sdunn@mpc-data.co.uk
web: www.mpc-data.co.uk
tel: +44 (0) 1225 710600
fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710631
MPC Data Limited is a company registered in England and Wales with company
number 05507446
Registered Address: County Gate, County Way, Trowbridge, Wiltshire, BA14
7FJ
VAT no: 850625238
The information in this email and in the attached documents is
confidential and may be legally privileged. Any unauthorized review,
copying, disclosure or distribution is prohibited and may be unlawful. It
is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message. When
addressed to our clients any opinions or advice contained in this email is
subject to the terms and conditions expressed in the governing contract.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: softvol plug-in dependancies?
2008-05-10 19:59 softvol plug-in dependancies? Simon Dunn
@ 2008-05-16 14:41 ` Takashi Iwai
2008-05-17 10:53 ` Simon Dunn
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2008-05-16 14:41 UTC (permalink / raw)
To: Simon Dunn; +Cc: alsa-devel
At Sat, 10 May 2008 20:59:28 +0100,
Simon Dunn wrote:
>
> Hi Guys
>
> The softvol plug-in, are there any pre-requisites or dependancies
> to using this?
No, AFAIK.
> I've tried various entries in the /etc/asound.conf
> configuration file all with the same result.
>
> I can see the control in alsamixer, once I've run the speaker-test
> through it, but cannot adjust any settings. Trying to run 'alsactl
> store 0' results in this error :
>
> .
> alsactl: control.c:2437: snd_ctl_elem_value_get_integer: Assertion `idx <
> sizeof
> (obj->value.integer.value) / sizeof(obj->value.integer.value[0])' failed.
> Aborted
> .
Which ALSA version, which driver and how is your configuration setup?
The softvol itself is known to work in most cases, but of course,
there could be remaining bugs. But, I suspect it's rather specific to
your use-case...
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: softvol plug-in dependancies?
2008-05-16 14:41 ` Takashi Iwai
@ 2008-05-17 10:53 ` Simon Dunn
2008-05-23 8:24 ` softvol plug-in dependancies? - [SOLVED] Simon Dunn
0 siblings, 1 reply; 4+ messages in thread
From: Simon Dunn @ 2008-05-17 10:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@alsa-project.org
> Which ALSA version, which driver and how is your configuration setup?
> The softvol itself is known to work in most cases, but of course,
> there could be remaining bugs. But, I suspect it's rather specific to
> your use-case...
>
Hi Takashi,
Thanks for your reply.
The version of ALSA lib and utils I'm mainly using is 1.0.10, though I've
tried version 1.0.16 and get the same results.
The Linux kernel I'm using is version 2.6.10, which includes the ALSA
driver architecture version 1.0.6.
I'm running this on a freescale mcf5475, Coldfire based platform.
I've reverted to using the dummy driver and a very basic asound.conf file,
see below, but still no joy with the plug-in.
It's the output from running amixer, once the softvol control is enabled,
that I find most curious. Listing its contents just seems to produce an
uninitialised device. Given the big endian nature of the cpu I'm
suspicious that this may be an endian bug, though after spending a couple
of days examining the alsa-lib code I've failed to find anything wrong up
to now, obviously ;)
Has the softvol plug-in been used on a big endian system to your knowledge?
Running amixer shows the controls implemented in the Dummy driver perfectly
well, and these can be adjusted using amixer or alsamixer.
The DMIX plug-in works just fine so if it is a bug, endian or otherwise,
then it is probably limited to the softvol plug-in rather than alsa-lib in
general.
Any help or suggestions you can provide is greatly appreciated.
Regards
Simon
.
asound.conf
.
pcm.globalvol {
type softvol
slave.pcm "hw:0,0"
control.name "GLOBAL Vol"
control.card 0
}
--
Simon Dunn, Software Engineer
MPC Data Limited
e-mail: sdunn@mpc-data.co.uk
web: www.mpc-data.co.uk
tel: +44 (0) 1225 710600
fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710631
MPC Data Limited is a company registered in England and Wales with company
number 05507446
Registered Address: County Gate, County Way, Trowbridge, Wiltshire, BA14
7FJ
VAT no: 850625238
The information in this email and in the attached documents is
confidential and may be legally privileged. Any unauthorized review,
copying, disclosure or distribution is prohibited and may be unlawful. It
is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message. When
addressed to our clients any opinions or advice contained in this email is
subject to the terms and conditions expressed in the governing contract.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: softvol plug-in dependancies? - [SOLVED]
2008-05-17 10:53 ` Simon Dunn
@ 2008-05-23 8:24 ` Simon Dunn
0 siblings, 0 replies; 4+ messages in thread
From: Simon Dunn @ 2008-05-23 8:24 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@alsa-project.org
Hi Takashi et al
Just thought I'd let you know that I found the bug that was causing the
softvol plug-in to fail. As usual my suspicions were about as far from
the cause as it is possible to get; it was neither a bug in the user mode
code, nor was it an endian issue.
I found the culprit in the core module in the kernel code. As I said in
earlier mails the kernel version I'm using (2.6.10) is not the latest and
contains the 1.0.6 version of the ALSA drivers.
The latest driver code I've looked at (1.0.15) already has fixes applied
and is not vulnerable to the same bug so I'm not reporting anything new.
I'll put a brief synopsis of the bug at the end of this email if anyone's
interested, otherwise you can stop reading now.
Takashi, thanks for your input.
Best regards
Simon
Description
-----------
I found the bug in the kernel core module in sound/core/control.c. It
was a 2 fold issue;
1) The elem_data pointer member of the user_element struct was being
assigned an address 4 bytes into the user_element struct instead of at the
end of it.
Change the statement ..
ue->elem_data = (char *)ue + sizeof(ue) + dimen_size;
to ..
ue->elem_data = (char *)ue + sizeof(*ue) + dimen_size;
fixes that one.
2) The softvol control is now enumerated correctly but still does not work;
amixer and alsamixer both report the volume as zero and neither can modify
it. The reason for this is that the user_element struct is not holding
information pertaining to the min and max volumes levels permitted by the
control. This information is passed into the driver via the _info
parameter of snd_ctl_elem_add but was not being retained.
To fix it is a simple matter of retaining all the information provided by
snd_ctl_elem_add and returning it appropriately.
As I said both of these issues are accounted for in latter versions of the
driver code so this description of them is for information only, should
someone
else trip over the same bug when using older versions of the architecture.
~Simon
--
Simon Dunn, Software Engineer
MPC Data Limited
e-mail: sdunn@mpc-data.co.uk
web: www.mpc-data.co.uk
tel: +44 (0) 1225 710600
fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710631
MPC Data Limited is a company registered in England and Wales with company
number 05507446
Registered Address: County Gate, County Way, Trowbridge, Wiltshire, BA14
7FJ
VAT no: 850625238
The information in this email and in the attached documents is
confidential and may be legally privileged. Any unauthorized review,
copying, disclosure or distribution is prohibited and may be unlawful. It
is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message. When
addressed to our clients any opinions or advice contained in this email is
subject to the terms and conditions expressed in the governing contract.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-23 8:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-10 19:59 softvol plug-in dependancies? Simon Dunn
2008-05-16 14:41 ` Takashi Iwai
2008-05-17 10:53 ` Simon Dunn
2008-05-23 8:24 ` softvol plug-in dependancies? - [SOLVED] Simon Dunn
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.