System sound crashes on Audacity start

After launching Audacity the system can play no sound.

Subsequently no application can produce any sound, regardless if Audacity is still on or is turned off.
A moderate, continue hissing can be heard in the speakers.
Volume (kmix) doesn’t have any effect.
Audacity can still record and the result file seems to play normally after the system reverts to normal.
Sound reverts to normal after reboot.
The device selections in Audacity seem to have no influence on the results.
The above can be duplicated 100% of the times.

Following Audacity versions were tested:
2.0.2-77.7-x86_64 from Packman repository
2.0.2-66.4-x86_64 from multimedia:apps (openSUSE 12.2)
2.0.0-2.1.2-x86_64 from openSUSE 12.2 OSS
and built from audacity-fullsrc-2.0.2 download.
No difference between them.

Tried several versions of ALSA - no difference. Currently:
~> cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.25.

System Configuration:
OS: Linux 3.4.11-2.16-desktop x86_64
System: openSUSE 12.2 (x86_64)
KDE: 4.8.5 (4.8.5) “release 2”
Intel(R) Core™2 Quad CPU Q9650 @ 3.00GHz
Total memory (RAM): 7.8 GiB
Free memory: 6.1 GiB (+ 872.1 MiB Caches)
Free swap: 2.0 GiB

The .asoundrc file existence makes no difference.
Normally, there is no .asoundrc file but making one (with the script) causes this contents:
pcm.Audigy2 { type hw; card Audigy2; }
ctl.Audigy2 { type hw; card Audigy2; }
pcm.HVR950Q { type hw; card HVR950Q; }
ctl.HVR950Q { type hw; card HVR950Q; }
pcm.NVidia { type hw; card NVidia; }
ctl.NVidia { type hw; card NVidia; }
pcm.U0x46d0x808 { type hw; card U0x46d0x808; }
ctl.U0x46d0x808 { type hw; card U0x46d0x808; }
pcm.CODEC { type hw; card CODEC; }
ctl.CODEC { type hw; card CODEC; }
pcm.!default pcm.Audigy2
ctl.!default ctl.Audigy2

That represents the following hardware:

  • Audigy2 ZX
  • HVR-950Q USB tuner
  • NVidia HDMI output of the GeForce 560TI
  • Logitech C600 Webcam
  • ION Tape2PC USB Cassette Deck

Starting Audacity from terminal shows this:
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.Audigy2.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.Audigy2.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.Audigy2.pcm.modem.0:CARD=0’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.Audigy2.pcm.modem.0:CARD=0’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.Audigy2.pcm.modem.0:CARD=0’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition ‘cards.Audigy2.pcm.modem.0:CARD=0’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Expression ‘snd_pcm_hw_params_set_format( pcm, hwParams, Pa2AlsaFormat( hostFormat ) )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 1086
Expression ‘snd_pcm_hw_params_set_format( pcm, hwParams, Pa2AlsaFormat( hostFormat ) )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 1086
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875
Expression ‘stream->playback.pcm’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 3875

Experimented with jack and made these disappear but without fixing the original problem:
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started

Out of ideas! Any help or suggestion appreciated. TIA

I’m not exactly an expert on this sort of thing but it certainly looks like something is broken in your sound system because Audacity just can’t find any sound system that works on your machine. Do you have PulseAudio installed?

Yes, PulseAudio is default in openSUSE 12.2. Nevertheless, I tried disabling it (in YaST) - no change. Then, I removed PulseAudio completely - still no change on this issue (confirmed PA is disabled, the mixer shows other devices, etc.). Right now I’m back to using PulseAudio since some KDE applications are using it by default.
What is different about Audigy that it can’t find any sound system that works; is there any way to force a device/system (like I tried with the .asoundrc file)?

Is that the entire contents of .asoundrc ?

btw, I can find plenty of reports of this problem with various distributions and various recording software but so far no solutions. It is not specific to any Linux distribution or to any recording software. It appears to be an ALSA problem but I’ve not found much more than that so we’ll need to poke around a bit.

Could you also open Audacity and from the Help menu select “Audio Device Info…”
Paste the contents from the pop-up window into your reply.

Regarding .asoundrc file:
There was no such file in the system (nor was /etc/asound.conf).
I tried creating one by running the script from the bottom of this page: http://alsa.opensrc.org/.asoundrc.
And yes, what I posted above is the full contents of the result.

Regarding Audio Device info:

==============================
Default capture device number: 25
Default playback device number: 25
==============================
Device ID: 0
Device name: SB Audigy 2 Platinum [SB0240P]: ADC Capture/Standard PCM Playback (hw:0,0)
Host name: ALSA
Input channels: 2
Output channels: 2
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 1
Device name: SB Audigy 2 Platinum [SB0240P]: Mic Capture (hw:0,1)
Host name: ALSA
Input channels: 2
Output channels: 0
Low Input Latency: 0.064000
Low Output Latency: -1.000000
High Input Latency: 0.256000
High Output Latency: -1.000000
Supported Rates:
==============================
Device ID: 2
Device name: SB Audigy 2 Platinum [SB0240P]: Multichannel Capture/PT Playback (hw:0,2)
Host name: ALSA
Input channels: 16
Output channels: 0
Low Input Latency: 0.010667
Low Output Latency: -1.000000
High Input Latency: 0.042667
High Output Latency: -1.000000
Supported Rates:
==============================
Device ID: 3
Device name: SB Audigy 2 Platinum [SB0240P]: Multichannel Playback (hw:0,3)
Host name: ALSA
Input channels: 0
Output channels: 16
Low Input Latency: -1.000000
Low Output Latency: 0.010667
High Input Latency: -1.000000
High Output Latency: 0.042667
Supported Rates:
    48000
==============================
Device ID: 4
Device name: SB Audigy 2 Platinum [SB0240P]: p16v (hw:0,4)
Host name: ALSA
Input channels: 2
Output channels: 8
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    44100
    48000
    96000
    192000
==============================
Device ID: 5
Device name: HVR-950Q: USB Audio (hw:1,0)
Host name: ALSA
Input channels: 2
Output channels: 0
Low Input Latency: 0.010667
Low Output Latency: -1.000000
High Input Latency: 0.042667
High Output Latency: -1.000000
Supported Rates:
==============================
Device ID: 6
Device name: HDA NVidia: HDMI 0 (hw:2,3)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 7
Device name: HDA NVidia: HDMI 0 (hw:2,7)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 8
Device name: HDA NVidia: HDMI 0 (hw:2,8)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 9
Device name: HDA NVidia: HDMI 0 (hw:2,9)
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 10
Device name: USB Device 0x46d:0x808: USB Audio (hw:3,0)
Host name: ALSA
Input channels: 1
Output channels: 0
Low Input Latency: 0.010667
Low Output Latency: -1.000000
High Input Latency: 0.042667
High Output Latency: -1.000000
Supported Rates:
==============================
Device ID: 11
Device name: USB Audio CODEC: USB Audio (hw:4,0)
Host name: ALSA
Input channels: 2
Output channels: 2
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    32000
    44100
    48000
==============================
Device ID: 12
Device name: sysdefault
Host name: ALSA
Input channels: 128
Output channels: 128
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 13
Device name: front
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 14
Device name: rear
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 15
Device name: center_lfe
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 16
Device name: side
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 17
Device name: surround40
Host name: ALSA
Input channels: 0
Output channels: 4
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 18
Device name: surround41
Host name: ALSA
Input channels: 0
Output channels: 128
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 19
Device name: surround50
Host name: ALSA
Input channels: 0
Output channels: 128
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 20
Device name: surround51
Host name: ALSA
Input channels: 0
Output channels: 6
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 21
Device name: surround71
Host name: ALSA
Input channels: 0
Output channels: 8
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 22
Device name: iec958
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.011610
High Input Latency: -1.000000
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 23
Device name: spdif
Host name: ALSA
Input channels: 2
Output channels: 2
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
==============================
Device ID: 24
Device name: dmix
Host name: ALSA
Input channels: 0
Output channels: 2
Low Input Latency: -1.000000
Low Output Latency: 0.042667
High Input Latency: -1.000000
High Output Latency: 0.042667
Supported Rates:
    48000
==============================
Device ID: 25
Device name: default
Host name: ALSA
Input channels: 32
Output channels: 32
Low Input Latency: 0.011610
Low Output Latency: 0.011610
High Input Latency: 0.046440
High Output Latency: 0.046440
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Selected capture device: 11 - USB Audio CODEC: USB Audio (hw:4,0)
Selected playback device: 12 - sysdefault
Supported Rates:
    11025
    16000
    22050
    32000
    44100
    48000
==============================
Available mixers:
==============================
Available capture sources:
==============================
Available playback volumes:
0 - Master:0
1 - Bass:0
2 - Treble:0
3 - 3D Control Sigmatel - Depth:0
4 - PCM Center:0
5 - PCM Front:0
6 - PCM LFE:0
7 - PCM Side:0
8 - PCM Surround:0
9 - Front:0
10 - Surround:0
11 - Center:0
12 - LFE:0
13 - Side:0
14 - Synth:0
15 - Wave:0
16 - IEC958 Optical:0
17 - Aux2:0
18 - AMic:0
19 - Analog Mix:0
20 - Audigy CD:0
21 - HD Analog Center/LFE:0
22 - HD Analog Front:0
23 - HD Analog Rear:0
24 - HD Analog Side:0
25 - HD SPDIF Center/LFE:0
26 - HD SPDIF Front:0
27 - HD SPDIF Rear:0
28 - HD SPDIF Side:0
==============================
Capture volume is emulated
Playback volume is native

Thank you

Some additional info.
Under /etc there are also these files:

alsa-pulse.conf containing:
@hooks [
{
func load
files [
“/etc/asound.conf”
“/etc/asound-pulse.conf”
“~/.asoundrc”
]
errors false
}
]

confdir:alsa.conf

and asound-pulse.conf containing:

PulseAudio plugin configuration

pcm.!default {
type pulse
hint {
show on
description “Default ALSA Output (currently PulseAudio Sound Server)”
}
fallback “sysdefault”
}

ctl.!default {
type pulse
fallback “sysdefault”
}

It’s perhaps a long shot, but one thing that I found on the Internet was a suggestion that exclamation marks “!” could be the problem,
In both asound-pulse.conf and .asoundrc I notice that there are exclamation marks.

Make backup copies of these files and then try with the ! characters deleted.
You will probably need to log out and back in again for the changes to take effect.
You may also need to try it without the .asoundrc file (as I think that is something that you added at some stage).

I’ll give it a shot this evening when I get back home, though I’m not holding my breath.
As I said, there is no .asoundrc file now (but I could make one and manually remove exclamation points).
Also, I’m not sure but I believe asound-pulse.conf was deleted (or I did) when removing all traces of PulseAudio and the problem was still there.
I’ll post the results. Thanks

Nope, the exclamation mark made no difference; tried several combinations.

Also tried, removing all the USB devices and respective drivers - only devices left Audigy2 and NVidia HDMI (but disabled): no change.

Finally, I was was hoping to see some message in some log, about what exactly happens when the sound system crashes.
Couldn’t find anything like that but this is what the kernel log says about ALSA:

12/04/12 08:35:39 PM	ALSA hda_intel.c	540 Enable delay in RIRB handling
12/04/12 08:35:39 PM	ALSA emufx.c	569 Installing spdif_bug patch: SB Audigy 2 Platinum [SB0240P]
12/04/12 08:35:40 PM	ALSA mixer.c	46 5:2: cannot get min/max values for control 2 (id 5)
12/04/12 08:35:40 PM	ALSA mixer.c	46 3:0: cannot get min/max values for control 2 (id 3)
12/04/12 08:35:40 PM	ALSA mixer.c	10 set resolution quirk: cval->res = 384

And this is from system log:

12/04/12 08:35:38 PM	user1	kernel	ALSA hda_intel.c:1540 Enable delay in RIRB handling
12/04/12 08:35:39 PM	user1	kernel	ALSA emufx.c:1569 Installing spdif_bug patch: SB Audigy 2 Platinum [SB0240P]
12/04/12 08:35:40 PM	user1	kernel	ALSA mixer.c:846 5:2: cannot get min/max values for control 2 (id 5)
12/04/12 08:35:40 PM	user1	kernel	ALSA mixer.c:846 3:0: cannot get min/max values for control 2 (id 3)
12/04/12 08:35:40 PM	user1	kernel	ALSA mixer.c:810 set resolution quirk: cval->res = 384
...
12/04/12 08:36:25 PM	user1	pulseaudio[4012]	[alsa-sink] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
12/04/12 08:36:25 PM	user1	pulseaudio[4012]	[alsa-sink] alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_emu10k1'. Please report this issue to the ALSA developers.
12/04/12 08:36:25 PM	user1	pulseaudio[4012]	[alsa-sink] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

I couldn’t find anything relevant on the net and I’m not sure it means anything.
The messages are the same when all the other applications are running fine; the only problem still remains with Audacity.
What is Audacity actually trying to do that causes the sound system crash?

Thanks

Audacity is trying to find out what audio hardware you have, but for some reason ALSA is not telling.

Do you have alsa-plugins-pulse installed?

Yes, see below (using zypper). Thanks

Information for package alsa-plugins-pulse:

Repository: openSUSE-12.2-Update
Name: alsa-plugins-pulse
Version: 1.0.25-3.4.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 84.2 KiB
Summary: Pulseaudio Plug-In for the ALSA Library
Description: 
pulseaudio is a networked sound server for Linux and other Unix like
operating systems and Microsoft Windows. It is intended to be an
improved drop-in replacement for the Enlightened Sound Daemon (ESOUND).

This package contains the polypaudio I/O plug-in for the ALSA library.



Information for package alsa-plugins:

Repository: openSUSE-12.2-Update
Name: alsa-plugins
Version: 1.0.25-3.4.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 149.3 KiB
Summary: Extra Plug-Ins for the ALSA Library
Description: 
This package contains the extra plug-ins for the ALSA library.



Information for package alsa:

Repository: openSUSE-12.2-Oss
Name: alsa
Version: 1.0.25-3.5.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 1.4 MiB
Summary: Advanced Linux Sound Architecture
Description: 
ALSA stands for Advanced Linux Sound Architecture.  It supports many
PCI, ISA PnP  and USB sound cards.
This package contains the ALSA init scripts to start the sound system
on your Linux box.  To set it up, run yast2 or alsaconf.

What happens if you try to record with other software? For example:

arecord -f cd  test.wav

I’ll try arecord in the evening and post the results. Meanwhile, I could say other software seems to work fine.
Yesterday, I tried Ardour and it records (even with monitoring on) and also plays. Ardour also uses ALSA but has no problem detecting the configuration.
I also tried KWave briefly and it also records and plays fine (but is not what I’m looking for).
As I mentioned in my 1st post, even Audacity is recording fine but at that time the play side of the sound system is dead so the PC generates no sound. The recorded file plays fine after rebooting.

Thanks

Are these problems happening only with SoundBlaster? What device does the “Default” playback choice in Audacity Device Toolbar give you?

Can you configure the default playback device in any of the apps that lose sound so that they use some other device?

Have you tried doing some tests with aplay after the sound has failed? See http://alsa.opensrc.org/Aplay .

For example do you get sound if you force the aplay rate to 48000 Hz?

Have you asked the opinion of the alsa-users list about the Audacity alsa lib errors you noted in your first post? See https://lists.sourceforge.net/lists/listinfo/alsa-user .


Gale

arecord test results:

arecord -f cd  test.wav

Runs, it does not cause sound system crash, and creates test.wav (without any sound since I believe the ION USB Cassette deck is not default, and I’m not concerned about it not being default either).

user1:~> arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: Audigy2 [SB Audigy 2 Platinum [SB0240P]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [SB Audigy 2 Platinum [SB0240P]], device 1: emu10k1 mic [Mic Capture]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [SB Audigy 2 Platinum [SB0240P]], device 2: emu10k1 efx [Multichannel Capture/PT Playback]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audigy2 [SB Audigy 2 Platinum [SB0240P]], device 4: p16v [p16v]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HVR950Q [HVR-950Q], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: U0x46d0x808 [USB Device 0x46d:0x808], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 4: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

This generates an actual wav record of the cassette playing:

user1:~> arecord -f cd -D hw:4,0 -d 20 test.wav

Thanks

Are these problems happening only with SoundBlaster?

There is only one out device (hardware) on the system, the SoundBlaster (Audigy2). I cannot verify the sound play through other device.

What device does the “Default” playback choice in Audacity Device Toolbar give you?

I believe it is “Default” after fresh install, after that it holds what I selected previously. None of the selections tried prevents Audacity from crashing the sound system.

Can you configure the default playback device in any of the apps that lose sound so that they use some other device?

See above, only one device. No sound is generated by the entire system except for the hissing; no volume adjustment works.

Have you tried doing some tests with aplay after the sound has failed? See > Alsa Opensrc Org - Independent ALSA and linux audio support site > .
For example do you get sound if you force the aplay rate to 48000 Hz?

Good idea, thanks. Tried and no sound is generated; didn’t get any sound from this either:

speaker-test -Dplug:surround51 -c6



Have you asked the opinion of the alsa-users list about the Audacity alsa lib errors you noted in your first post? See > alsa-user List Signup and Options > .

Not sure those messages during Audacity start up are a true indicator of the issue; I installed Audacity in a virtual machine (also openSUSE 12.2) and launching Audacity from the command line also causes a bunch of error (or error-like) messages. However, Audacity seems to work fine regardless those errors. Also, they seem to change depending on the devices selected for output and/or input.
Finally, I’m afraid posting on a different list about my problems that happen exclusively with Audacity is asking for a reply like “go fix it in Audacity forums”. I thought about ALSA forums and openSUSE forums but everything else seems to work fine, except for Audacity. No other application breaks the system sound.

Thanks

How did the computer come to have no motherboard sound? Might that have something to do with it?

Just to eliminate possibilities, have you tried removing the USB cassette deck from the computer?

Have you tried quitting Audacity and resetting preferences:
http://manual.audacityteam.org/o/man/preferences.html#stored ?


Gale

Just to eliminate possibilities, have you tried removing the USB cassette deck from the computer?

As mentioned earlier, I removed all USB devices - no change.

Have you tried quitting Audacity and resetting preferences:
Audacity Manual > … tml#stored ?

Followed the instructions - no change.

How did the computer come to have no motherboard sound? Might that have something to do with it?

I’m running a few more tests; I’ll report on this and the test results tomorrow or the day after tomorrow.

Thanks

Update:

First, a few more items tried.

  • Created a new user (to rule out user settings) => still NG.
  • Installed 32bit version of Audacity (to rule out 64 bit dependencies) => still NG.
  • Booted Live KDE CD (openSUSE 12.2) and installed Audacity (to rule out system settings and overall install) => still NG.
    So, at this point we can pretty much rule out any configuration mistake - the default system acts the same.

Going back to previous question:

How did the computer come to have no motherboard sound? Might that have something to do with it?

This is by choice. There is sound on the motherboard but it is disabled in BIOS and was never used because I need several functions of the Audigy2 ZS Platinum I/O front panel (http://www.ixbt.com/short/2k3-08/audigy_2_zs_platinum.jpg).
I did not consider testing with the on-board audio for several reasons:

  • Was not sure the test would be valid unless I physically remove the Audigy to prevent conflicts, and I didn’t look forward to doing the work.
  • The BIOS is tweaked and optimizer (CPU is running at 4.05GHz); didn’t want to mess with the BIOS by forcing new resources allocation when enabling the on board audio.
  • Didn’t want to risk messing up the OS sound configuration by adding a new sound card.
  • This hardware configuration ran fine (including Audacity) until a few months ago when I switched from openSUSE 11.4 to 12.2.
  • Lastly, I didn’t see the benefit for it - my intent is to getting Audacity work with my system, not removing components so my system works with Audacity.

Nevertheless, for testing purposes, I saved my BIOS settings, performed a full system image backup and enabled the on board audio (but left Audigy in too). If the OS sees Audigy as default card - same problem, sound crash. However, if the on board audio is configured as default, Audacity seems to work without causing system crash. Just a note here, even if working, the command line still shows “error-like” messages:

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HDA-Intel.pcm.rear.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM rear
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HDA-Intel.pcm.center_lfe.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM center_lfe
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.HDA-Intel.pcm.side.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM side
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3857
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1035
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1192
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1433
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2105
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3875

As explained above, the on board audio working is not that useful because I have no intent to discard very good hardware for a program to work (that’s one of the reasons I’m using Linux and not Windows!). The positive is now the problem is limited to Audigy.
Giving Audacity the benefit of the doubt, I started looking up reports about ALSA and Audigy problems. I was surprised by the results - after skipping the obvious user/configuration issues what is left points to … Audacity! There are multiple reports about problems; a few of them even look like mine just that instead of system crash there is simply no sound (or no recording). Users are also running Ardour or other programs just fine, Audacity is the only one that doesn’t respond. Continuing the digging I found that these problems started a few years ago; at this point I recalled that I briefly had some Audacity upgrade problems myself and I ended up reverting the update and locking the package so it doesn’t update anymore. Browsing through my older files I found that probably the last RPM that I installed and ran fine under 11.4 was audacity-1.3.12-99.pm.99.20.x86_64.rpm (from Packman). I am aware of RPMs for different distributions not running correctly on others but I tried installing this RPM (and it did, without complain) to see if there is any difference. Unfortunately, when trying to run it is crashing with errors about definitions in some libraries (and I think that would be expected).
Along the same lines, I looked up different Audacity RPMs and tried them. Of course, neither runs stable but I was able to find one thing - any Audacity RPM version 1.3.13 or higher causes sound system crash; any RPM version 1.3.12 and lower does not. I checked the change log and I believe the change that caused all this grief is described here:

  • Device Toolbar (on by default) now contains all input and output device
    choices, including host and recording channels. Input/output choices are
    no longer in Mixer Toolbar on Windows XP or some older operating systems.
    New Transport > Rescan Audio Devices menu item to refresh the device list.

Starting from this, I downloaded the 1.3.12 source and tried to build on current system, with the hope that using the current environment will yield better results than installing the old RPM for openSUSE 11.4. Unfortunately, after I spent extended time dealing with error messages (mostly syntax, caused by changes in new version libraries), I was able to build but launching causes segmentation fault. So, this is NG.

Next, I took a closer look at the source changes between 1.3.12 and 1.3.13. I was not sure but thought AudioIO.cpp is where I should focus first (approx 3700 lines). Comparing the 2 versions I found most 1.3.13 changes relate to MIDI (which I don’t use) and portmixer, which I thought might be related. Looking up online, I found I could configure without portmixer so I did that with 2.0.2 and was able to build. However, this resulted in Audacity 2.0.2 launching with crashing the sound but having no devices listed on the device bar and no sound capabilities at all. So, NG.

Going back to the differences, I disclose here that my C++ skills are (below) minimal, so armed with just that I tried to understand the differences between 1.3.12, 1.3.13 and 2.0.2. The intent was trying to change (read “mangle”) the portmixer and audioIO part of 2.0.2 to mimic 1.3.12 and 2.0.2 will subsequently build fine. Not to my surprise, the hard work put resulted in another build of Audacity 2.0.2 with no sound capabilities.

Furthermore, I abandoned the native Linux path and looked into workarounds. First, I tried Wine (actually PlayOnLinux) and tried latest Audacity only to see it crash on launch with: Unhandled exception: page fault on read access to 0xa88154bd in 32-bit code (0x0054f8ab). Tried both 32 and 64bit wine, multiple versions, libraries, etc. - NG. However, after many tries, it crossed my mind to look at the same difference 1.3.12 - 1.3.13 and to my surprise, Audacity 1.3.12 doesn’t cause the page fault but 1.3.13 does. So, even with the Windows binaries there is a significant difference between 1.3.12 and 1.3.13. Thus, with 1.3.12 launching fine under Wine, I proceeded to testing the operation. It does seem to work for the most part (recording, playing, a few effects) and it does recognize lame and ffmpeg plugins. The main problem I found though, is that I can’t change the options for export; clicking the Options button does nothing - the file does export but with default (i.e. mp3 128kbps joint stereo). So, this is usable for some tasks but not something I could rely on.
Digging up some more, I found that older Audacity versions used File Type settings for export, under preferences. So I got 1.2.6 and installed; it does indeed allow changing the export quality. Now, the problem is I’m not very comfortable using 1.2.6 since I believe is over 4 years old (and it is under Wine too).

Another thing to mention is I also tried Audacity 2.0.2 running under virtual machines. Tried openSUSE 12.2 32bit under KVM and couldn’t get the USB devices seen by OS - gave up. Tried openSUSE 12.2 64 bit under VirtualBox - everything seems to load OK but there are major latency issues when recording - gave up. Tried XP 32bit under VMware - this actually seems to work fine - but how sad is it that I have to resort to XP virtualization in Linux, for running an application supposed to run on Linux natively?

In conclusion, there was a little bit of progress (compared to nothing) but still long way to go. Unfortunately, I can’t think of many ways to improving the situation. I don’t think there is a quick way to modifying the source for Audacity 1.3.12 so it builds and runs on newer distributions (and don’t believe is worth the effort).
A “half-solution” would be finding how I can manually change the export settings under XP, so I can use 1.3.12 under Wine. I tried looking for configuration files or registry settings and can’t figure out where do Audacity or Lame (or FFmpeg) save the last settings. Some pointers would be appreciated.

The best solution I could think of, is taking a second look at the changes implemented between 1.3.12 and 1.3.13 carried over to newer versions, and fixing the program so it has some “fail-safe” mechanism in case it doesn’t fully “understand” the configuration. I’m thinking this is no fluke, it is just one of those situations originally believed “should not happen” but they still do. I will be willing to assist with testing and collecting information. Of course, the best would be just adding some switches to ./configure line and rebuild but I’m almost certain things are not that simple.

Best regards