how to make apps share audio device and play without breaks

hi,
i figured it’s best to start a new topic. here’s the thing. i can play sound only in one application at a time. if i play youtube and audacious at the same time either youtube has no sound or audacious hangs, if i play vlc and audacious sthe sound is noisy. i think it’s not normal, and before reistalling OpenSUSE i was able to listen to youtube videos without quitting my audio player and vice versa.

the output of

 lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*

after starting the system is:

COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 4145 user   16u   CHR  116,7      0t0 3672 /dev/snd/controlC0
pulseaudi 4145 user   22u   CHR  116,7      0t0 3672 /dev/snd/controlC0
mixer_app 4197 user   21u   CHR  116,7      0t0 3672 /dev/snd/controlC0

is this ok? i mean pulseaudio. i’ve read that alsa is default and i’d like to use this plugin in vlc and audacious.

after starting audacious the output looks like this:

COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 4145 user   16u   CHR  116,7      0t0 3672 /dev/snd/controlC0
pulseaudi 4145 user   22u   CHR  116,7      0t0 3672 /dev/snd/controlC0
mixer_app 4197 user   21u   CHR  116,7      0t0 3672 /dev/snd/controlC0
audacious 4507 user   10u   CHR   14,0      0t0 8363 /dev/mixer
audacious 4507 user   13w   CHR   14,3      0t0 8448 /dev/dsp

in audacious i have to use OSS plugin, with alsa it makes scratchy noises when playing. same thing in vlc. either way in audacious mp3 sometimes start with a loud scratch which wasn’t the case before.

OSS does not share the sound device. It uses the device exclusively.

The alsa API will share the sound device.

That is one reason why the Linux developers have been pushing to develope pulse audio and have it adopted. However pulse audio is still buggy and many application developers do not support it.

Some openSUSE sound concepts: Sound-concepts - openSUSE

yes, i know that now. thanks. what i meant was how to make apps use alsa without scratchy noises and breaks. since pulse is still buggy i’d prefer alsa.

Typically alsa apps are scratchy because the speakers are being over-driven. One needs to go to YaST > Hardware > Sound > Other > Volume and move down PCM, Master, Speaker volume settings (as applicable) to 65% or so (although for some sound cards this is too low as sound won’t be heard), and then close YaST and go to one’s mixer (kmix or alsamixer) and tune the volume settings there in PCM, Master and Speaker (as applicable) and possibly some surround sound volume controls, until one achieves a level that is optimal. Iterations are almost always necessary to find an optimal setting.

If no matter what is attempted, the sound is still scratchy, then one if one has the latest 1.0.20 of alsa (per the troubleshooting guide’s alsa update section: SDB:AudioTroubleshooting - openSUSE ) then one is into bug reporting territory, in trying to get either an openSUSE packager/dev or an alsa dev to look at the issue. For raising bugs on openSUSE: Submitting Bug Reports - openSUSE (being certain to raise bug against component “sound” )

thanks, i’ll try that and report back later.
pulseaudio loading at boot shouldn’t bother me?

well, it didn’t work. sound is scratchy no matter what level pcm or master is on. i use

alsa-1.0.18-8.7
alsa-utils-1.0.18-6.4
alsa-firmware-1.0.17-1.42

in alsamixer chip and card are pulseaudio. is that correct? and alsa doesnt load on boot only pulseaudio. is it suppose to be like that?

Typically alsa apps are scratchy because the speakers are being over-driven.

it’s hard to believe that this is the case. do many people report such problems with alsa? how come some of them manage to play sound without scratches? from what i can see on my computer it’s not related to pcm or master volume, breaks and scratches occur even at 50.

ok - noted

ok, 1.0.17/1.0.18, and I posted:

ok, so you do not have the latest 1.0.20 nor have you followed the troubleshooting guide I linked. Do you need detailed help to follow the alsa update referenced in that guide?

I don’t know what you mean.

No. alsa loads on boot.

Many users mistakenly over drive their speakers. Its very common.

Most do not have scratches. Most users have different hardware, which means different code inside the driver is applied.

50 ? what is 50 ?

ok, so you do not have the latest 1.0.20 nor have you followed the troubleshooting guide I linked. Do you need detailed help to follow the alsa update referenced in that guide?
it would seem so. yast says unable to create repo from Index of /repositories/multimedia:/audio and after running alsa info script and getting this infor on kernel:

Kernel release: 2.6.27.7-9-pae
Operating System: GNU/Linux
Architecture: i686
Processor: athlon
SMP Enabled: Yes

i run commands for kernel 2.6.27.7_9.1-1.1-pae i386 GNU/Linux (openSUSE-11.1) from Alsa-update - openSUSE. i dont know if this was a good idea but driver seems to be not updated for i still have 1.0.18.

I don’t know what you mean.

what i meant was this: ImageBam - Fast, Free Image Hosting and Photo Sharing

ok, so alsa loads on boot. so it is not supposed to be here right? only pulseaudio?

COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 4145 user   16u   CHR  116,7      0t0 3672 /dev/snd/controlC0
pulseaudi 4145 user   22u   CHR  116,7      0t0 3672 /dev/snd/controlC0
mixer_app 4197 user   21u   CHR  116,7      0t0 3672 /dev/snd/controlC0

50 ? what is 50 ?
i meant pcm and master levels.

If you provide the output of:
uname -a
I’ll provide you the recommended commands to send to update your alsa version to 1.0.20.

Linux 154-mi2-6 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 athlon i386 GNU/Linux

the answer to the question in the topic is GET RID OF FRIGGIN PULSEAUDIO!! now youtube and audio player play music simultaneously and without breaks and glitches. thanks everybody, you’ve been helpful, but seriously it should be a sticky for every newbie with this problem.

Hmmm … there should be a way to configure pulse, but the level of knowledge as to how one tunes pulse is not present. Pulse is just too new. Plus since many of us who try to help do not have the problems reported, its not practical for us to mess around in this. Why fix something that is not broken. Pulse works on my PCs.

Glad to read its working for you now. I hope there are no side effects from removing pulse.

oldcpu adjusted his/her AFDB on Saturday 08 Aug 2009 17:26 to write:

>
> crystalnewbie;2023549 Wrote:
>> the answer to the question in the topic is GET RID OF FRIGGIN
>> PULSEAUDIO!! now youtube and audio player play music simultaneously and
>> without breaks and glitches. thanks everybody, you’ve been helpful, but
>> seriously it should be a sticky for every newbie with this problem.
>
> Hmmm … there should be a way to configure pulse, but the level of
> knowledge as to how one tunes pulse is not present. Pulse is just too
> new. Plus since many of us who try to help do not have the problems
> reported, its not practical for us to mess around in this. Why fix
> something that is not broken. Pulse works on my PCs.
>
> Glad to read its working for you now. I hope there are no side effects
> from removing pulse.
>
>

Hi oldcpu,

This is what I was suffering from on both my machines with the HDA Azalia
audio chip.

I tried all the configs for pulse with all the apps I could find even the
hardware routing etc… etc… and could never get it stable or play more than
one stream at a time consistently.

That is why I always recommend to remove everything pulse except for the
libpulse0.

I presume it could be down to the mixture of hardware and the drivers and
pulse not just one or the other.

The time I was able to get 11.2 M4 on one machine the sound was OK`ish with
pulse but during and after the install unfortunately 11.2 does not like the
2 64bit machines I tried it on so cannot comment on if it has been fixed yet
as I had to wipe both machines due to them not being able to boot after
shutdown, they just get stuck on a kernel crash early in the boot process
yet 11.2 runs like a dream.

So I can have pulse in 11.2 but no system or 11.1 and no pulse :slight_smile:

Go figure

Mark
Caveat emptor
Nullus in verba
Nil illegitimi carborundum

I’m sorry to read about these difficulties.

We are fortunate in openSUSE that at Novell/SuSE-GmbH there are packagers who are also very experienced in audio. But they need bug reports in order to address the problems. So I hope you were able to document this problem in a bug report.

Fair enough, but IMHO a more long term approach is to write a bug report, documenting the problem.

I do not have these pulse problems on 6 completely different PCs. I know others have had painful problems with this, but I dare say if I spent the time to remove the pulse (on PCs with functional sound) I could quite likely make things break, when now they work. Hence I do not recommend it.

Also IMHO its better to bring to the attention of those who do the packaging and the development, the problems that exist, and work with them, as opposed to drastic actions that simply do not stop the perpetuation of the problem. Thats all IMHO of course, …

I saw you already mentioned on one of my threads your 11.2 problems. I also hope there you wrote a bug report.

Anyway, in general for all users, 11.2 milestones are for users to try, and document their problems. Which means if they don’t work, WRITE A BUG REPORT and work with the devs.

oldcpu adjusted his/her AFDB on Saturday 08 Aug 2009 22:16 to write:

> Anyway, in general for all users, 11.2 milestones are for users to try,
> and document their problems. Which means if they don’t work, WRITE A BUG
> REPORT and work with the devs.
>
>

I would oldcpu but I don`t think:

kernel crash on install dvd/cd will help anyone,

I tried for 3 days to get M3 working and all I got was a single line on a
console only to see a kernel crash but thanks to the new fast boot there is
no kernel message

This is about 2 seconds into booting from media ( d/loaded 5 times burnt and
checked over and over ) or if I so manage ti get something installed, works
fine on my other machines.

I would get laughed at by the devs I have no data except

will not boot on AMD 64bit muticore

I have been using SuSE for over 12 years I do know a little about it, I have
been a dev and I used to moderate these very groups but if I aint got the data I cant tell them what is wrong.

I do file bug reports if I can.


Mark
Caveat emptor
Nullus in verba
Nil illegitimi carborundum

I understand …

There was a time when I had a problem booting an alpha version of openSUSE, and I thought the same as you just expressed. I wrote a bug report.

The dev’s came up with ways to get information that never occurred to me.

In my case, by process of elimination it pointed to a failing hard drive with an intermittent fault that was on the failing drive’s MBR. Being intermittent it was difficult to track down. But the logs that I had thought not obtainable (but the installation software dev’s were able to produce ways to tell me to get them) basically removed all possibilities until all that was left was hardware. When I finally broke down and swapped in a spare hard drive, my problems disappeared.

If it had not been for the bug report, I never would have solved the problem.

oldcpu adjusted his/her AFDB on Saturday 08 Aug 2009 22:46 to write:

>
> In my case, by process of elimination it pointed to a failing hard
> drive with an intermittent fault that was on the failing drive’s MBR.
> Being intermittent it was difficult to track down. But the logs that I
> had thought not obtainable (but the installation software dev’s were
> able to produce ways to tell me to get them) basically removed all
> possibilities until all that was left was hardware. When I finally broke
> down and swapped in a spare hard drive, my problems disappeared.
>
> If it had not been for the bug report, I never would have solved the
> problem.
>
>

I have even tried using a serial console linked up to a machine but the
machines do not even reach a point to give any output.

Both the machines are running 11.1 perfect all hardware is absolutely spot
on here, I should know I have built every machine I have owned since the mid
80``s they both run 3 different distros and windows ( shh… I know but hey
I gotta make a living somehow to keep these beasts running and depleting the
ozone layer so we can have nice summers )

It has got to ne a combination of a load of factors but I cannot find which
will even get me an error report, have stripped them down to bare minimum
just DVD hard disk and graphics with all extras turned off in the BIOS (
audio, fire wire, usb, external sata interface hypervisor you name it ) now
I did get a net install installed and running but as soon as I reboot the
kernel crashes on load with no output ( that is on m5 ) I could not get that
far in m4,tried nvidia cards and ati`s ( that is the only piece of hardware
left that I can physically change left kin the machines.

There are as far as I know no reports about this ( searched and searched )
just to say a “me too” but none I can find, as I say though they would kick
me off there because I can not supply one shred of detail.

As I said the only machine that does work is an old laptop with a celeron,
limited memory and a sis chipset graphics, so not only terrible performance
from the CPU there is no 3D and never will be on that chip as it does not
support GL at all, now that is like swimming in molasses with 11.2 and not
worth the bother.

Ahh well will wait for M6 and see if that works…

Anyway nearly time for bed.

Night oldcpu


Mark
Caveat emptor
Nullus in verba
Nil illegitimi carborundum

The problem I encountered some years back was also on a PC that my wife and I assembled our selves.

I’m wondering if it is possible to insert a USB device, and then during the installation have the log file written to the USB ?

Anyway, … I think you should write a bug report. I still believe it is possible you have not considered everything (none of us are perfect), and that the installation software dev’s at SuSE-GmbH may know a trick or two that you have not thought about.