How to tell Flash which sound device to use?

What device does flash playback use?

Not 100% correct.
PulseAudio uses ALSA to produce sound, not the other way round. And it takes exclusive control over ALSA.
alsa-plugins-pulse makes applications use PulseAudio instead of ALSA, otherwise they won’t play nicely with PulseAudio (because PulseAudio takes full control over the ALSA sound device).

PulseAudio mainly is a (software) layer above ALSA, that mixes all sound sources together and allows playback of several simultanous sources on one sound output (it also provides other features though).

It can be used as a drop-in replacement for GNOME’s earlier ESD sound daemon, maybe this gives you a better idea how it fits in.

Or, maybe this clears up some things:
ALSA is at the bottom. It is the kernel’s interface to access sound cards.
Everything else (including PulseAudio) is just software on top of that.

Until now I used two configuration tools:
YaST, which I guess (I am not sure) sees that the default device gets the number 0 in the range of device files. When my guessing here is OK, that is done as intended.
KDE, which alows you to define a sequence of devices for several application ranges like sound, video, system alerts, etc. All can have a different sequence. I have no idea if these KDE systemsettings are a GUI frontend to ALSA, PulseAudio, or something internal to KDE only.

Those apply to KDE’s multimedia framework, Phonon. That is independent to ALSA and PulseAudio (although it uses one of the two in the end of course to actually produce sound), and only applies to (KDE) applications that use Phonon.

Phonon is there to offer KDE and KDE applications an easy way to playback multimedia streams (not only audio).

You could compare Phonon to gstreamer in a way, but it tries to be independent of a specific third-party library so it uses backends to actually decode/play multimedia streams (audio and video). At the moment the main two are phonon-backend-gstreamer and phonon-backend-vlc, which use gstreamer and VLC respectively for the actual work, those in turn use either PulseAudio or ALSA directly for sound playback.

And now I have installed pavucontrol. I have no idea what it should control. It does not seem to have a man page :frowning:

If your application is running and producing sound, pavucontrol should show it and let you configure things like volume or output device for that application AFAIK. But I haven’t used that either yet of course, as it is a frontend to PulseAudio.

There is, of course, the option to disable PA (I presume it is running) and see if that makes things easier.
If you do so, check the device list in KDE System Settings > Multimedia > Audio and Video Settings afterwards, see if it corresponds to what you set in YaST.

Wolfis post helped me there!

I started pavucontrol and indeed, it starts shwoing movement in the ruler of the device in use.

“Normal” uses the Xitel HiFi USB device.

Flash uses the Internal one (I guess an onboard device).

The third is a Cape Verde/Pitcairn HDMI … (no idea what that means).

Hi Wolfi,

Thanks for the explanation. I had the pipline completley wrong then >:(

As you can see above, your information about pavucontrol let me answer the question asked: which device of the two others is used.

KDE (through Phonon) thus has nothing to do with my problem, because while it works OK for all KDE applications, flash never sees it (which is what I concluded earlier without knowing tthe word Phonon).

Problem is still that while controlC0 is the lowest numbered soundcard in /dev/snd, flash does not honour this, but seems to have it’s own ideas. This could be due to ALSA, but I am unsure why ALSA does not follow the /dev/snd/controlC0 which is hw,0 ((or similar in ALSA terms.

And the .asoundrc did not help either.

This would be the internal (onboard) sound card I guess, yes.

The third is a Cape Verde/Pitcairn HDMI … (no idea what that means).

This should be your graphics card’s HDMI output.
“Cape Verde” and “Pitcairn” are codenames for certain Radeon model ranges (Radeon HD 7700 and HD 7800 respectively).
See . :wink:

That’s correct, yes.

Problem is still that while controlC0 is the lowest numbered soundcard in /dev/snd, flash does not honour this, but seems to have it’s own ideas. This could be due to ALSA, but I am unsure why ALSA does not follow the /dev/snd/controlC0 which is hw,0 ((or similar in ALSA terms.

And the .asoundrc did not help either.

Well, as I see it, alsa-plugins-pulse redirects Flash to use PulseAudio, so the .asoundrc or ALSA’s default output would not apply any more. But that’s only guessing now, I’m not sure at all.
Can you not configure the output device for Flash in pavucontrol?

Disabling PulseAudio should make Flashplayer to respect ALSA’s settings (including .asoundrc) though. You can easy enough do that in YaST->Hardware->Sound->Other->PulseAudio Configuration (logout/login is required though), as mentioned already by somebody else. You will of course not be able to centrally configure application settings in pavucontrol as long as PA is disabled though.

That must be correct, the system has an HDMI output.

It is not used in our problem here, thus we can ignore it’s existence for the moment.

I am going to do that test. But first I guess ,dinner must be ready. I will report back after dinner and the switching off :wink:

I would suggest removing .asoundrc also, use it if you have to.
I have only had to set it up once, I had to solve a priority issue on my laptop (I forced it to use card1 as default as I could not change priority in YaST, for some reason); I think you can do quite a lot with it, though, but that requires reading I suppose; whenever the ALSA auto-detection (alsa.conf) of the device fails, or is incomplete, one could utilise this file to load/force those capabilities/features etc.
I have no real knowledge about configuring ALSA, but come across specialised .asoundrc set-up, now and again, on the LAU list, LinuxMusicians forum …

Bon appetit:)

Your combined efforts did it!

After switching off PA I walked throughYaST and KDE to check everything. I first had to wrestle with a phoney second Xitel (that maybe was there because of an different USB bus used earlier). After that was settlled, “normal” sound worked OK, byt still no flash.

I already thought about removing the .asoundrc (after all we now walked a different path and it is always better to clean up old things), but forgot. Partly because I thought it was a rather harmless configuration. After F_Sauce’s last post, I removed it. And now it works as wanted.

All partcipating, thanks a lot.

I definitely learned something about the sound pipeline. However I can not realy assess what the fact that PA is now switched off means for the future.

Bon appetit:)

Merci baucoup. C’etait bon.

Glad you solved it:)

However I can not realy assess what the fact that PA is now switched off means for the future.

I have never used it, only briefly tried it. But to me, from what I have read about it, it seems more like a pain in the arse than providing anything that I miss. The network sound features of the PA seems interesting though, but have not had any use for it yet. The multiple sound source mixing is/was often emphasised, as I comprehend it, as its vital feature, though that is (and was) of course available through ALSA’s dmix also (has been for a long time), and as such is not of any crucial importance.
Just my, partially ignorant, view on the matter.
I think you will be just fine without PA.

Well, when you install 13.1 it is there. So to this dumb end-user it s something to be used (you only realy know that something is bloatware when you have some insight in tthe subject). But when it is only for things I (and my wife) will never even think about, we can live without it of course. Less overhead will be the bonus :wink:

I Like PA because it makes it easy to assign volume levels to each app. It gives much finer control then alsa by itself. I use vermix which is a widget control much like paucontrol but easy because it lives on the system tray. But some people have reported problem due to vermix so your mileage may vary.

I admit early versions of pulse were a pain I I turned it off but since 11.4 it has worked well for me. I had a small problem with the new MB but moving the NVIDIA HDMI to 0 it has worked fine. I used the jacks from the MB but it seems like the NVIDIA card took them over making the onboard sound mute. Go figure :stuck_out_tongue:

I see you have solved this by disabling pulse audio, and congratulations for your success.

wrt pulse audio …

As has been noted elsewhere in the thread, pulse audio provides a good capability to assign the audio output of certain applications to certain hardware devices, and it also allows the assignment of audio input from certain devices to specific applications. It also provides other more advanced functionalities, most of which I have not played with.

jdmcdaniel3 and I both created blog entries on pulse audio, to try provide an indication how it could be used with multiple sound devices:

Possibly I should create a new blog that specifically points to controlling the audio device output for individual applications, but I confess I thought I had achieved that with my blog.

I have read that pulseaudio does not play well with some hardware, but the hardware that it does play well with (such as the hardware on my PCs) provides a super method to have sound from specific applications go to specific speaker devices.

I have experimented and had sound from application A and C go to sound device-0 and sound from application B go to sound device-1 all at the same time.

wrt default setting, pulse audio remembers your last setting by default.

I suspect your problem could have been solved with pavucontrol. BUT having typed that, I am not certain as my PC with two sound hardware devices too old to test the specifics as to what you wanted.

Still you solved it via disabling pulse audio, and well done for your success ! :slight_smile:

Thank you oldcpu.

As it seems that PA can be of use to people (I will not deny that), in my case, it was only sitting there without me even knowing. Now I can live with that as long as it is transparent to the unknowing. But in this case it seems that Flash created problems. Not being a lash fan it is easy to blame flash for this. I do not know of any way to configure flash thus I asked.

As said, I only want to hear sound through that Xitel device (which is connected to our Stereo Set in the living room) when going to certain “radio” sites on the internet. Rather basic. And it happens that there are a lot of different ways available to those sites to provide sound. The silly thing with the site we have the flash problems with is that for some of their streams we can open them with Amarok (Firefox asking with what to open this link), but others seem to use Flash. While I can understand that one site uses method A and another side choose for method B, itt is beyond my understanding why one organisation should use two different ways of making music available. I asked them, but got no answer until now.

Switching off PA in this system “worked”. I am willing to believe that I could have used pavucontrol to redirect the flash sound from the internal device to the Xitel, but I did not see any controls in that window how to do this. There were just the three devices and their volume controls. But maybe I missed something. In any case, my wife is very happy that it works again. It did in earlier situations, but that system went from 11.4 to 13.1 and then the hardware was replaced rather sooon after.

Again thanks everybody, also for the “after sales”!