Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences change?

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.x.x package for your distribution or compile Audacity from the source code.
Rincewind
Posts: 25
Joined: Wed Jul 23, 2008 12:33 pm
Operating System: Please select

Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences change?

Post by Rincewind » Sun Dec 05, 2010 12:08 pm

I find that every time I start Audacity I have to reset the device preferences to select the correct device - they always seem to be set at 'default' when Audacity starts, no matter how many times I set them to use my M-Audio 24/96 card.

How do I set them so that they really are set?

Whose preferences are they anyway? Mine or something else's ?

Ancillary question 1: What are the 'defaults' and where are they set?
Ancillary question 2: Why does Audacity list hardware which is disabled in BIOS on my PC as potential devices to be used when setting preferences? )Maybe that is a question for a Linux forum.....)

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by steve » Sun Dec 05, 2010 1:11 pm

Rincewind wrote:How do I set them so that they really are set?
Open Audacity
Make the settings
Close Audacity.

Re-open Audacity and the settings should be the same provided that your sound system has not changed.
Rincewind wrote:Whose preferences are they anyway? Mine or something else's ?
The "default" setting in Audacity is the system default setting. For a default Ubuntu 10.10 installation this will be the PulseAudio default which can be set in the PulseAudio Volume Control. Unfortunately I don't think that the PulseAudio Volume Control is included in the default installation of Ubuntu 10.10, but you can install from Synaptic by installing "padevchooser" and "pavucontrol".
Rincewind wrote:Why does Audacity list hardware which is disabled in BIOS on my PC as potential devices to be used when setting preferences? )Maybe that is a question for a Linux forum.....)
Your BIOS has not really disabled the device. DEL computers are well known for doing this - the BIOS just tells Windows not to use the device, but for other operating systems the device is still visible, and often still enabled :shock:

If you really need to disable a device, you can do so by blacklisting the module for that device so that the module is not loaded.
This command will list your currently loaded modules:

Code: Select all

lsmod
(for a shorter list, try "lsmod | grep snd" (without quotes).

On my computer I have this listed for the internal sound card:

Code: Select all

snd_hda_intel          22107  2 
snd_hda_codec          87552  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               5040  1 snd_hda_codec
snd_pcm                71475  2 snd_hda_intel,snd_hda_codec
To edit the blacklist file:

Code: Select all

sudo gedit /etc/modprobe.d/blacklist.conf
Add each module that you wish to disable to the end of blacklist.conf
PLEASE BE CAREFUL AND MAKE A BACKUP OF THIS FILE.
Just in case you mess up your computer, ensure that you have a Linux boot disk handy so that you can get back in and reverse the changes to /etc/modprobe.d/blacklist.conf

It is not usually necessary to disable an audio device as you can use PulseAudio Volume Control to set any device you like as the default.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by bgravato » Mon Dec 06, 2010 2:28 am

If you want to be sure that audacity is writing your Preferences to the config file do this:

1) open audacity
2) set your preferred devices
3) quit audacity
4) type this in a console terminal windows:

Code: Select all

grep Device ~/.audacity-data/audacity.cfg
These are the devices audacity will try to load next time you start audacity. If those devices are not available it will revert to "default".
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

Rincewind
Posts: 25
Joined: Wed Jul 23, 2008 12:33 pm
Operating System: Please select

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by Rincewind » Mon Dec 06, 2010 9:41 am

Reply to user Steve (sorry, I don't understand how to quote within this forum management application):

Thanks for this very clear guidance. I think you have pointed to the key issue when you say (words to the effect of) '... provided the sound system hasn't changed'. There's the rub - it seems like other applications - such as music players and video viewers, both standalone and those which are plug-ins to Firefox, do indeed change my sound device prefs. without explicitly informing me.

(This a considerable irritation because, no matter how earnestly I try, it is always about 23:14 when I can get to my PC to capture this evening's edition of Late Junction on BBC Radio3, which starts at 23:15. (The original sole purpose for moving to Linux was to get Audacity to record these programmes - I was unaware at the time that Audacity existed as a Windows version too!). Then I find I require about 10 minutes to figure out why Audacity is not recording - a reset usually requires a system restart on my system.)

Thanks for the observation about the pulseaudio volume control - that explains why I can't find it.

I'll avoid the black-listing for the moment and see how I get on with Pulse.

Again, thanks for the input

Rincewind
Posts: 25
Joined: Wed Jul 23, 2008 12:33 pm
Operating System: Please select

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by Rincewind » Mon Dec 06, 2010 9:43 am

bgravato wrote:If you want to be sure that audacity is writing your Preferences to the config file do this:

1) open audacity
2) set your preferred devices
3) quit audacity
4) type this in a console terminal windows:

Code: Select all

grep Device ~/.audacity-data/audacity.cfg
These are the devices audacity will try to load next time you start audacity. If those devices are not available it will revert to "default".
Ah - thanks for this clarification. It does indeed seem that sometimes my M-Audio card is not available - for reasons I do not understand.

Rincewind
Posts: 25
Joined: Wed Jul 23, 2008 12:33 pm
Operating System: Please select

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by Rincewind » Mon Dec 06, 2010 9:51 am

steve wrote: (for a shorter list, try "lsmod | grep snd" (without quotes).
(I figured out how to use 'quote'....)

On my system this command reveals:
snd_via82xx 24092 1
snd_ice1712 66696 1
snd_ice17xx_ak4xxx 3115 1 snd_ice1712
snd_via82xx_modem 10430 0
snd_ak4xxx_adda 9318 2 snd_ice1712,snd_ice17xx_ak4xxx
snd_cs8427 7938 1 snd_ice1712
snd_usb_audio 105567 1
gameport 11224 1 snd_via82xx
snd_ac97_codec 125227 3 snd_via82xx,snd_ice1712,snd_via82xx_modem
ac97_bus 1474 1 snd_ac97_codec
snd_i2c 5574 2 snd_ice1712,snd_cs8427
snd_pcm 89104 5 snd_via82xx,snd_ice1712,snd_via82xx_modem,snd_usb_audio,snd_ac97_codec
snd_mpu401_uart 6849 2 snd_via82xx,snd_ice1712
snd_hwdep 6660 1 snd_usb_audio
snd_usbmidi_lib 21313 1 snd_usb_audio
snd_seq_midi 5932 0
snd_seq_midi_event 7291 1 snd_seq_midi
snd_seq 57512 3 snd_seq_midi,snd_seq_midi_event
snd_rawmidi 22207 3 snd_mpu401_uart,snd_usbmidi_lib,snd_seq_midi
snd_timer 23850 2 snd_pcm,snd_seq
snd_seq_device 6912 3 snd_seq_midi,snd_seq,snd_rawmidi
snd 64117 23 snd_via82xx,snd_ice1712,snd_via82xx_modem,snd_ak4xxx_adda,snd_cs8427,snd_ac97_codec,snd_usb_audio,snd_i2c,snd_pcm,snd_mpu401_uart,snd_hwdep,snd_usbmidi_lib,snd_seq,snd_rawmidi,snd_timer,snd_seq_device
snd_page_alloc 8588 3 snd_via82xx,snd_via82xx_modem,snd_pcm
soundcore 1240 1 snd


Wow!. Do I really need al this stuff just to play sound through my M-Audio card? (Which isn't mentioned as far as I can see - unless it's the 'snd_ICE1712').

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by bgravato » Mon Dec 06, 2010 10:18 am

When you reboot, if you have more than 1 card installed, it not always detected them and configure them in the same order. So sometimes your m-audio can be card 0, other times it can be card 1. In Audacity preferences this might show as hw0 and hw1. This changing after each reboot can be annoying and mess up your configurations.

Luckly there's a way to force this order to be always the same.

I recommend reading this article: http://alsa.opensrc.org/index.php/MultipleCards

To find out which soundcard modules you have loaded and its order type this command:

Code: Select all

cat /proc/asound/modules
In the first column you have the number of the card has it was detected/configured and in the second column the name of the module.

In my case I have this:

Code: Select all

$ cat /proc/asound/modules 
 0 snd_virtuoso
 1 snd_hda_intel
Means that the card using the module snd_virtuoso is hw0 and the snd_hda_intel is hw1.

To always force this order I edited the file /etc/modprobe.d/alsa-base.conf and I added the following lines:

Code: Select all

options snd_virtuoso index=0
options snd_hda_intel index=1
The 'index' option will tell the system which number to assign to that card when the module is loaded. ALSA by default uses the card with index 0. So you should set index=0 for the module of the card you want to be your default.
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

Rincewind
Posts: 25
Joined: Wed Jul 23, 2008 12:33 pm
Operating System: Please select

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by Rincewind » Mon Dec 06, 2010 11:46 am

bgravato wrote:When you reboot, if you have more than 1 card installed, it not always detected them and configure them in the same order. So sometimes your m-audio can be card 0, other times it can be card 1. In Audacity preferences this might show as hw0 and hw1. This changing after each reboot can be annoying and mess up your configurations.

Luckly there's a way to force this order to be always the same.

I recommend reading this article: http://alsa.opensrc.org/index.php/MultipleCards

To find out which soundcard modules you have loaded and its order type this command:

Code: Select all

cat /proc/asound/modules
In the first column you have the number of the card has it was detected/configured and in the second column the name of the module.

In my case I have this:

Code: Select all

$ cat /proc/asound/modules 
 0 snd_virtuoso
 1 snd_hda_intel
Means that the card using the module snd_virtuoso is hw0 and the snd_hda_intel is hw1.

To always force this order I edited the file /etc/modprobe.d/alsa-base.conf and I added the following lines:

Code: Select all

options snd_virtuoso index=0
options snd_hda_intel index=1
The 'index' option will tell the system which number to assign to that card when the module is loaded. ALSA by default uses the card with index 0. So you should set index=0 for the module of the card you want to be your default.
This is very interesting to me - advances my understanding of Linux - thanks. I will use the recommendations you have given.

I am still very confused by the names that the various parts of Linux give to devices.. For example, Audacity can refer directly to my M Audio card in a way that I understand:

"M Audio Audiophile 24/96: ICE1712 multi (hw:0.0)"
(well, I understand the first part of it)

But ALSA only has "snd-ICE1712" - and I would never know that this is my M Audio card.

But worse is PulseAudio; its Device Chooser tells me, for 'Output Devices', I have 2 instances of "Internal Audio Analog Stereo" - and that is clearly ambiguous: as far as I am concerned my M Audio card is internal - but so too, obviously, is the VIA 8237 chip - otherwise known as snd-via82xx. Device Chooser also tells me, for 'Input Devices', I have 'Internal Audio Digital Stereo (IEC958)' - what ever that is, but fails to make any mention of the analog stereo input on my M-Audio card - which is the only input I use.

Furthermore <System><Preferences><Sound> lists 'Hardware', 'Input Devices' & 'Output Devices' (And I assume these last 2 are different entities to 'Hardware') - all using totally inscrutable terms, with no mention at all of M Audio.

If an Application like Audacity can give me clear information, why can't system services do the same?

bgravato
Posts: 2098
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Linux Debian

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by bgravato » Mon Dec 06, 2010 12:01 pm

One of the advantages of linux is that you have often many different pieces of software for doing the same thing, using different approaches. This gives you a wider range of choice to better suit your needs and taste, but can also be a little confusing and, at the same time, is also one of the drawbacks with linux.

Sound on linux is a rather complex subject which I have been fighting for years and which I'm yet far away from fully understanding it...

Digital outputs usually refer to things like S-PDIF output, many cards have it, but you're probably not using that. Usually you use the analog outputs and inputs.

I'm not very familiar with pulseaudio (steve has a deeper insight of it), but I believe that if you device is being used (and locked) by another program then it won't show on pulseaudio. I think it will only show the devices it has available and can control.
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Ubuntu 10.10, Audcaity 1.3.12 beta: Why preferences chan

Post by steve » Mon Dec 06, 2010 6:31 pm

Unfortunately, sound card manufacturers rarely bother to write drivers for Linux - They have to write drivers for Windows because Windows has such limited hardware support built in, but has such huge dominance of the domestic PC market. Fortunately Linux has much more comprehensive hardware support built in than Windows does, but because a specific driver for the particular make and model of sound card has not been installed, Linux has to try and work out what sort of sound card you have by querying the device. The sound card will usually report back with the type of chip that it is using (and not the make/model of the sound card).

The Ice1712 chip is commonly used in M-audio sound cards. When ALSA looks at the M-Audio sound card, what it sees is the Ice1712 chip.

As suggested by Bruno, if you type into a Terminal window

Code: Select all

cat /proc/asound/modules
You will get a list of the sound cards that are currently loaded.
The number in the left column of the output relates directly to the "hw" number.

For example, on this laptop I have an internal (on-board Intel) sound chip, and a Behringer UCA 202 USB sound card.
"cat /proc/asound/modules" returns:

Code: Select all

 0 snd_hda_intel
 1 snd_usb_audio
so on this computer,
"hw:0" refers to the internal (Intel) sound card
"hw:1" refers to the Behringer UCA 202 (USB) sound card.

In PulseAudio Volume Control, Pulse Audio attempts to give them meaningful names (just like you were asking for ;) )
so on this laptop, if I open the PulseAudio Volume Control and go to the "Configuration" tab, I see:
"Internal Audio" (the internal sound card "hw:0")
"PCM 2902" (a rather cryptic description of the UCA 202 sound card "hw:1")

(A quick Google search for "PCM 2902" immediately comes up with "USB Audio - USB CODEC - PCM2902")
Rincewind wrote:But ALSA only has "snd-ICE1712" - and I would never know that this is my M Audio card.
That's where Google comes in useful. You now know a bit more about your M-Audio card - it uses a "Ice1712" chip.
Rincewind wrote:I have 2 instances of "Internal Audio Analog Stereo"
Oh dear, that's a bit unfortunate.
Not to worry, the first one listed should be hw:0 and the second one should be hw:1, which you can look up using the command "cat /proc/asound/modules"

You can also check which is which by temporarily disabling one of them:
PulseAudio Volume Control > Configuration tab
set the profile of one of the sound cards to "Off" - sound from that sound card should now stop.
set it back to "Analogue Stereo Duplex" and it should immediately come back on again.

At this point it will simplify things a lot if you switch off the sound card that you do not wish to use.

What was the question? Have we answered it? :P
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked