Volume control - can't set for secondary sound card
The volume control for AWN doesn't work for me. I'm one thing off of being able to get rid of the top gnome bar in Ubuntu 8.10 but I need to be able to control the audio and this current applet won't work for me. I don't have the ability to turn off the onboard audio from the BIOS but that shouldn't be a solution that people say anyway cause it's dumb. So how can I get the volume applet to recognize that I'm not using the onboard sound and instead using a CL Audigy 2ZS PCMCIA card?
thank you for any assistance you can provide.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Awn Extras Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- onox
- Solved:
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
At the moment that's not possible, but if you answer following questions I can modify the applet:
open your terminal, type: "python"
type: import alsaaudio
then type: alsaaudio.cards()
Paste the output
(assuming it outputs a list with 2 elements -- something like ['a', 'b']), type: alsaaudio.mixer(1)
Does this output a list?
Then type: alsaaudio.mixer(2)
Does this output an alsaaudio.
Then quit by pressing ctrl+d
Revision history for this message
![]() |
#2 |
Thank you very much for your reply. I do want to say that I LOVE AWN and although not as pretty as some of the alternatives (especially with what I've seen for Windows XP), I think it's the best out there in terms of usability and features. But enough ass-kissing.
This is everything I tried. I'm pretty new to Linux but I think I did as asked.
feeboo@workhorse:~$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import alsaaudio
>>> alsaaudio.cards()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'cards'
>>> alsaaudio.mixer(2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'mixer'
>>> alsaaudio.cards()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'cards'
>>>
-------
And I'll try to give as much info as possible regarding my sh*tty laptop. I have another outstanding issue on ubuntuforums that involves flash audio. I can listen to music, watch videos, listen to any type of sound. But any video that I watch online that is flash (youtube, etc), the audio doesn't work. I'm thinking the problems could be related.
Revision history for this message
![]() |
#3 |
Can you check in your package manager what version of python-alsaaudio you have?
Could you try alsaaudio.mixers(1) and alsaaudio.
About flash... do you have pulseaudio? See https:/
Revision history for this message
![]() |
#4 |
0.2-1ubuntu1
as for adding a 's'
feeboo@workhorse:~$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> alsaaudio.mixers(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'alsaaudio' is not defined
>>> alsaaudio.mixers(2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'alsaaudio' is not defined
>>>
as for flash audio I've tried a dozen different things. It's really peculiar. When I have time I'm gonna go through everything once again and hopefully make it work. I'm more concerned about getting the volume control to work. Thanks again.
Revision history for this message
![]() |
#5 |
>>> alsaaudio.mixers(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'alsaaudio' is not defined
You need to type: "import alsaaudio" first :)
Ok, it seems that alsaaudio.cards() is only defined in 0.4. One last thing: could you add the following to a file test_alsa_cards.py:
import commands
for i in commands.
print i
print commands.
and then type in your terminal: python test_alsa_cards.py. Paste the output
Revision history for this message
![]() |
#6 |
:)
/org/freedeskto
alsa.card = 0 (0x0) (int)
alsa.card_id = 'Intel 82801DB-ICH4 with AD1886A' (string)
/org/freedeskto
alsa.card = 0 (0x0) (int)
alsa.card_id = 'Intel 82801DB-ICH4 with AD1886A' (string)
/org/freedeskto
alsa.card = 1 (0x1) (int)
alsa.card_id = 'Audigy 2 ZS Notebook [SB0530] (rev.0, serial:0x20011102)' (string)
/org/freedeskto
alsa.card = 1 (0x1) (int)
alsa.card_id = 'Audigy 2 ZS Notebook [SB0530] (rev.0, serial:0x20011102)' (string)
/org/freedeskto
alsa.card = 1 (0x1) (int)
alsa.card_id = 'Audigy 2 ZS Notebook [SB0530] (rev.0, serial:0x20011102)' (string)
the first thing you wrote (adding "import alsaaudio") didn't change the final output. same response as before.
Revision history for this message
![]() |
#7 |
import alsaaudio -> you mean the output of alsaaudio.
Revision history for this message
![]() |
#8 |
If you type python, then import alsaaudio, and then alsaaudio.
One last thing: type in your terminal:
hal-device /org/freedeskto
And:
hal-device `hal-get-property --key alsa.originatin
Revision history for this message
![]() |
#9 |
feeboo@workhorse:~$ hal-device /org/freedeskto
udi = '/org/freedeskt
info.callouts.add = { 'hal-acl-tool --add-device' } (string list)
linux.device_file = '/dev/snd/pcmC1D0p' (string)
info.
linux.sysfs_path = '/sys/devices/
alsa.device_file = '/dev/snd/pcmC1D0p' (string)
info.subsystem = 'sound' (string)
info.parent = '/org/freedeskt
alsa.
info.product = 'ADC Capture/Standard PCM Playback ALSA Playback Device' (string)
alsa.card = 1 (0x1) (int)
info.udi = '/org/freedeskt
alsa.type = 'playback' (string)
alsa.card_id = 'Audigy 2 ZS Notebook [SB0530] (rev.0, serial:0x20011102)' (string)
linux.
alsa.device = 0 (0x0) (int)
linux.subsystem = 'sound' (string)
info.capabilities = { 'alsa', 'access_control' } (string list)
alsa.pcm_class = 'generic' (string)
info.category = 'alsa' (string)
alsa.device_id = 'ADC Capture/Standard PCM Playback' (string)
access_
access_
and
feeboo@workhorse:~$ hal-device `hal-get-property --key alsa.originatin
udi = '/org/freedeskt
linux.sysfs_path = '/sys/devices/
info.subsystem = 'sound' (string)
sound.
info.parent = '/org/freedeskt
info.product = 'Audigy 2 ZS Notebook [SB0530] (rev.0, serial:0x20011102) Sound Card' (string)
sound.card = 1 (0x1) (int)
info.udi = '/org/freedeskt
sound.card_id = 'Audigy 2 ZS Notebook [SB0530] (rev.0, serial:0x20011102)' (string)
linux.
linux.subsystem = 'sound' (string)
info.capabilities = { 'sound' } (string list)
info.category = 'sound' (string)
Revision history for this message
![]() |
#10 |
Can you confirm that when you type python, then import alsaaudio, and then alsaaudio.
Revision history for this message
![]() |
#11 |
feeboo@workhorse:~$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import alsaaudio
>>> alsaaudio.
ALSA lib control.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
alsaaudio.
>>> alsaaudio.mixers(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument 1 must be string, not int
>>> alsaaudio.
ALSA lib control.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
alsaaudio.
>>>
i don't know what to tell you. changing the number doesn't do anything either. i'm amazed by your service and i'll help however i can. but this doesn't seem to work for whatever reason. it's asking for a string. i added quotes, which i figured wouldn't work but i'd give it a shot.
Revision history for this message
![]() |
#12 |
It seems python-alsaudio-0.2 uses cardnames instead of a cardindex, but these cardnames are different than the names returned by HAL. Can you ask the ubuntu folks to package 0.4?
Revision history for this message
![]() |
#13 |
Can you try to create a file test_gst.py:
import gst
print gst.element_
It should print a list, probably like this: ['hw:0,0', 'hw:0,4']
then do: python
import alsaaudio
alsaaudio.
(or a different name if you get different output from test_gst.py)
Revision history for this message
![]() |
#14 |
i'm now working on two computers cause i got my old computer working again. so copying output over won't be as easy but i'll certainly do it if it helps you out with this. but in this case i don't think it'll make a difference. i'm still getting alsaoutput errors.
i created that file. added the commands to it. opened up terminal, opened python and imported that file. it outputted 5 things
(0,0),(
then i typed import alsaaudio and it gave me the prompt and then i typed alsaaudio.mixers with every one of them, not that i expected the output to change but i wanted to be thorough.
every time i got this error
alsaaudio.
I'm now going to send something to Ubuntu although i have no clue whether they'll listen to me or not =)
i bet you didn't expect this all to be such a headache. your dedication to your project though is incredible. i've never seen anything like it.
Revision history for this message
![]() |
#15 |
What makes this difficult is that python-
Revision history for this message
![]() |
#16 |
just to let you know i wrote this:
https:/
and that eventually resulted in this:
https:/
i wouldn't worry too much about this problem at this point. if it's a bug with ubuntu and it's going to get fixed (hopefully) soon than it may be best just to wait for that. i'll update the second i hear it's been fixed and get back to you.
if you want to continue with gstreamer i'll gladly do whatever you ask. but again, there may not be a point.
Revision history for this message
![]() |
#17 |
I have already gstreamer support working for a single soundcard.
Can you do this:
1) Set the Master track volume of your first soundcard (Intel) to a low number via gnome's volume control
2) Set your Master track volume of your second soundcard (Audigy) to a high number via gnome's volume control
Can you add following to test_gst_mixer.py:
#!/usr/bin/env python
import gst
mixer = gst.element_
mixer.set_
mixer.set_
for track in mixer.list_
if track.flags & gst.interfaces.
if track.flags & gst.interfaces.
print track.label, "min,max: (%d, %d), channels=%d volume=" % (track.min_volume, track.max_volume, track.num_channels) + str(mixer.
mixer.set_
Execute this file (python test_gst_mixer.py) with hw:0,0 like above. Then change it to hw:1,0 and execute the file again. You should see something like this:
Master min,max: (0, 31), channels=2 volume=(24, 24)
Question: are the volume numbers higher the second time or the same? (Maybe you should also try hw:0 and hw:1 (without ,0)
Revision history for this message
![]() |
#18 |
Can you test the new testing PPA (bzr1094)? See https:/
You can change your card in the preferences. Please tell me if it works or not.
Revision history for this message
![]() |
#19 |
Can you test the new testing PPA (bzr1094)? See https:/
You can change your card in the preferences. Please tell me if it works or not.
Revision history for this message
![]() |
#20 |
Sorry, I've been away all weekend and I've been working on it for the past hour. I didn't attempt your second last message but I can if you would like. I've been trying to get the trunk version of your product going. I'm having a lot of difficulty. I'm using the Synaptic Package Manager and whenever I click on one it says that it won't install because of missing packages. Then I click on those and it says:
libawn0-trunk:
Depends: libgnome-
Depends: libgtk2.0-0 (>=2.15.0) but 2.14.4-0ubuntu1 is to be installed
I should probably just use a sudo line and install them that way. I don't want to mess it up though. Would you mind writing out the command to ensure that all dependencies are installed? Or tell me how to go about doing it with the Synaptic Package Manager. I just figure it's wiser to ask then to try a half dozen things and then have to remember it all when I tell you I couldn't figure it out :P
Revision history for this message
![]() |
#21 |
A dev says you're trying to install jaunty packages. You have 8.10 which is iirc intrepid, so you need to change your sources.list. Oh and the bzr1105 version was just built, I would try that instead of 1094 because in 1105 it should detect multiple soundcards properly.
Revision history for this message
![]() |
#22 |
Well probably last time I get to talk to you so I'll once again say how impressed I am with your dedication. I'm listening to a mix right now and I've switched it back and forth between the two sound cards a few times and it hasn't messed up in any way. I've also figured out that you can scroll the volume up and down when hovering over the icon. sweet, sweet idea. Anyway, it's working great now. Still not sure if I'm ready to drop the top bar but at this point I have no reason not to. All thanks to you. Cheers mate.
Sincerely
Rob S
Revision history for this message
![]() |
#23 |
Nice to hear that you like the applet :D. You can also mute/unmute the volume by clicking the middle mouse button (that should be your scrollwheel) when hovering over the icon.