No sound, no information why, where to start?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

No sound, no information why, where to start?

Post by atle »

Wine and spotify used to work. Now it doesn't, and I don't know why.

Main problem is that Wine doesn't give any information back regarding why audio fails, only that it fails.

When using winecfg, opening the Audio tag, choosing Alsa Driver and pressing "Test sound", a pop up reports "Audio test failed!". Nothing more. Choosing OSS, switching to emulation, same error message.

But I have to mention that I do get a couple of "disabling mixer" debug messages.

I have browsed the documentation, and used google, but not been able to find any information about how to find out what the problem is.

Alsa is of course working in other programs. Aplayworks. Mplayer works. KDE configuration test works.

So, how do I start figuring out what's wrong?
jordan

No sound, no information why, where to start?

Post by jordan »

Hi alte,

you don't by chance have other audio applications open, when trying to
use wine, do you???

- this would also include your web-browser (which often grabs the audio).

- are you using pulseaudio?

I wil have the same problem, if another app is grabbing the soundcard.

jordan
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

Hi jordan.

I have three computers in daily use, on two of them Wine works fine. And on the two which are working, I am able to use wine with sound at the same time as I am using Firefox and playing youtube Flash videos. And this is without pulse audio.

I am no expert on linux sound, so I don't know why this works, or why it shouldn't work.

I've read the FAQ's and man pages of Wine, and /dev/dsp is mentioned. Also testing write access to /dev/dsp to check if some other application is blocking the device. But as far as I understand, /dev/dsp is OSS related, and is not relevant for ALSA.

So my obvious question is:
- does ALSA really also have the "only one access at a time" limitation mentioned?
- if so, what trick allows me to play sound from multiple applications, including Wine, at the same time on two of my machines?

And as I mentioned, I am pretty sure I'm not using pulse audio.
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

I tested with lsof, and the only open sound related device was /dev/snd/controlC1 opened by kmix. Killing kmix of course changed nothing.
jordan

No sound, no information why, where to start?

Post by jordan »

Hey Atle,
I have three computers in daily use, on two of them Wine works fine. And on the two which are working, I am able to use wine with sound at the same time as I am using Firefox and playing youtube Flash videos. And this is without pulse audio.
Okay, that is good. you have points of comparison....
I am no expert on linux sound, so I don't know why this works, or why it shouldn't work.
I've read the FAQ's and man pages of Wine, and /dev/dsp is mentioned. Also testing write access to /dev/dsp to check if some other application is blocking the device. But as far as I understand, /dev/dsp is OSS related, and is not relevant for ALSA.
You are correct, that sounds like they are talking about OSS, and not ALSA.
So my obvious question is:
 - does ALSA really also have the "only one access at a time" limitation mentioned?
Yes, indeed ALSA does. That is why ESD was developed, and why
Pulseaudio is now in use. Alsa talks to the hardware, while apps may
be talking to Pulseaudio/kmix and then are routed to ALSA. or are
directly talking to ALSA - in which case they will grab the device and
potentially block all other apps. Jack also works on top of ALSA, and
combats issues like these (although it is designed more for
low-latency pro-audio use).
 - if so, what trick allows me to play sound from multiple applications, including Wine, at the same time on two of my machines?
Are you running KDE? (you mention Kmix below) Kmix allows you to do
this. It is a sound daemon, much similar (in concept) to things like
Pulseaudio, ESD, etc.
And as I mentioned, I am pretty sure I'm not using pulse audio.
nope, it sounds like you are not! :)

This one sounds tricky, as you say that "it used to work". It's
pretty hard for me to retrace your steps.. But if i was in your shoes,
that is exactly what i would be doing! Retracing my own steps: i would
ask myself things like "did i do an update, change settings, did my
computer crash, have i installed any new applications or libraries
...things along these lines.

As i don't use kmix, i know very little about it...Nor do i use KDE.

jordan
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Post by DanKegel »

For what it's worth, I often use
speaker-test
as a reality check to make sure the speakers are plugged
in and the linux audio drivers are working. Does that
make noise on the affected system, as it should?
jordan

No sound, no information why, where to start?

Post by jordan »

On Sun, Sep 12, 2010 at 12:22 PM, DanKegel <[email protected]> wrote:
For what it's worth, I often use
 speaker-test
as a reality check to make sure the speakers are plugged
in and the linux audio drivers are working.   Does that
make noise on the affected system, as it should?
Im not sure that i follow you. "speaker-test"???

do you mean "test-sound" in winecfg?????

explain?

jordan
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Post by DanKegel »

No, speaker-test is a native Linux program.
http://manpages.ubuntu.com/manpages/luc ... est.1.html

If winecfg's sound test works, of course, you don't need to do
a native speaker-test.
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

Hi jordan,

I think kmix is an application that only sets sound. But KDE uses its own phonon system, with a gstreamer, xine, mplayer or vlc backend

I did find that I have configured /etc/asoud.conf with a dmix set up at some point. I've disabled and rebooted, to check if there is anything different. Well, I lost my default device. aplay -D default doesn't work any more.

The strange thing is that if using gstreamer backend with KDE4, there is a device called default, as well as HD-Audio Generic, and hw:1,3. All of them working.

With dmix, I can start several aplay -D default, and play several streams on top of each other.

But no matter what I do, wine is refusing to play anything. The most frustrating part of that is the complete lack of information about what wine is trying, and why it fails.
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

I have not tried speaker-test yet. I will, but I don't suspect it will do anything but playing sound. Sound is working, with every application I've tried, except Wine.
jordan

No sound, no information why, where to start?

Post by jordan »

On Mon, Sep 13, 2010 at 3:37 PM, atle <[email protected]> wrote:
Hi jordan,

I think kmix is an application that only sets sound. But KDE uses its own phonon system, with a gstreamer, xine, mplayer or vlc backend
Ya, I don't use KDE, i just naturally assume it plays a similar role
to Pulseaudio (which also can set sound).
I did find that I have configured /etc/asoud.conf with a dmix set up at some point. I've disabled and rebooted, to check if there is anything different. Well, I lost my default device. aplay -D default doesn't work any more.
Ya, you probably didn't need to do that.
The strange thing is that if using gstreamer backend with KDE4, there is a device called default, as well as HD-Audio Generic, and hw:1,3. All of them working.
That's kind of what i would expect to see.
With dmix, I can start several aplay -D default, and play several streams on top of each other.
yup, that is part of dmix's function. However, lots of alsa
applications do hog the soundcard.
But no matter what I do, wine is refusing to play anything. The most frustrating part of that is the complete lack of information about what wine is trying, and why it fails.
Have you tried a fresh install of Wine??? you can do this simply by
renaming your .wine folder (as to not lose anything), then try
uninstalling Wine. After you have re-installed wine and all of it's
packages. try winecfg then, and see if it will produce sound. It
will create a new .wine , but if the sound works, then you could
replace it with your old .wine

Your problem is a weird one. For you to not have changed anything, and
it just stopped working. very odd.
I would try the clean install of wine and see if it makes a
difference. if it doesn't, there is a good chance it has little to do
with Wine, and more likely something to do with settings being messed
up somewhere on your machine,
maybe some type of corruption. Im not really sure.

sorry i don't have a solution. It's really hard to figure out, without
being in front of your machine..

As for speaker-test, don't bother. that isn't wine specific, just
Linux/ALSA specific. it wont help.

jordan
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

>Ya, I don't use KDE, i just naturally assume it plays a similar role
to Pulseaudio (which also can set sound).

Sorry, bad description on my part. kmix is an alsamixer equivalent for KDE. It doesn't play anything, or mix sound streams like dmix.

>That's kind of what i would expect to see.

I wouldn't. Where is gstreamer finding a default ALSA device that aplay can't find?

This is linked to the previous question, why can't aplay -L or KDE4/phonon/gstreamer find the devices I create in asound.conf?

I wish there would be some more consistency here.

>Have you tried a fresh install of Wine??? you can do this simply by
renaming your .wine folder (as to not lose anything), then try
uninstalling Wine.

I'll try that. I have only tried removing .wine to recreate settings.

>For you to not have changed anything, and
it just stopped working.

I didn't say that. I upgrade gentoo all the time. I even upgrade kernel now and then. Also I've changed from a ATI47** to an ATI56**. But these are steps that cannot easily be reversed.

Also, sound is working. It's just wine doing something strange. But I'll try reinstalling it tonight.

What I miss is something like what was used in the old ~/.wine/config:
[ALSA]
"PlaybackDevice" = "default"

(Ref: http://wiki.jswindle.com/index.php/Wine_Config_File)

If I found a way to do the same in the new .reg files, I'd be happy.
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

And as I posted the previous, I checked my next opened tab, and found:

Code: Select all

I got this working finally!

I wrote it up in my blog here: http://meandubuntu.wordpress.com/200...dio-from-wine/

But basically it involved setting the following in the registry for Wine:
[Software\\Wine\\Alsa Driver]
“AutoScanCards”=”N”
“DeviceCount”=”1″
“DeviceCTL1″=”default”
“DevicePCM1″=”default”
“UseDirectHW”=”N”
Will try, and report back.
[/code]
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

Miss the possibility to edit posts. The above post came from the Ubuntu forum here: http://ubuntuforums.org/showthread.php?t=700231
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

I'd like to make a comment here.

Spotify does work. It's when you try to actually play some music that things start failing - Spotify shows a little message saying that it can't play the sound because the "format is unsupported".

Well, it does this for me, anyway. Spotify used to play all music fine, now it doesn't and instead displays this message, and sound works just fine in almost all other apps (Wine or not).

Not sure if this is the actual message the original poster saw, if so, the problem *may* not be audio-related, or related to the network or audio decoding (OGG I believe) libraries instead.
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

Hi DaVince,

I have spotify on two Linux computers. One works, the other doesn't.

The error message is not the same, but I don't remember the exact text now. Anyway, it's Wine that's having problems, not Spotify.
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Problem solved

Post by atle »

The configuration code solved the problem.

Code: Select all

[Software\\Wine\\Alsa Driver]
"AutoScanCards"="N"
"DeviceCount"="1"
"DeviceCTL1"="default"
"DevicePCM1"="default"
"UseDirectHW"="N"
Wine is great software. But I really wish information like this was available in documentation, and that winecfg would reply with some useful information when failing.

For example "Opening device 'something' failed".
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Post by atle »

And by the way, if someone else is sitting on a ATI graphics card, and wants to use the built in audio function over HDMI/DVI, I needed to create an /etc/asound.conf to get things working. If not there was no "default" alsa device.

Here is what the file looks like for me:

Code: Select all

pcm.mymix {
    type dmix
    ipc_key 1021          # must be unique!
    slave {
        pcm "hw:1,3"
        period_time 0
        period_size 1024  # must be power of 2
        buffer_size 8192  # ditto
        #format "S32_LE"
        #periods 128      # ditto
        rate 48000
    }

    bindings {
        0 0   # from 0 => to 0
        1 1   # from 1 => to 1
    }
}


pcm.!default {
    type plug
    slave.pcm "mymix"
}

pcm.dsp {
    type plug
    slave.pcm "mymix" 
}

pcm.dsp0 {
    type plug
    slave.pcm "mymix" 
}

pcm.dsp1 {
    type plug
    slave.pcm "mymix"
}


I don't know if dsp, dsp0 and dsp1 is needed, but they were in the example I copied.

After doing this it's possible to use for example:
aplay -D default someaudio.wav

What also could have been done was:

Code: Select all

pcm.wine {
    type plug
    slave.pcm "mymix"
}
And then using 'wine' as a device exclusive for wine. But any other device than default seems to only allow one connection at a time, while default allows many.

That's what I've figured out so far. :)
jordan

No sound, no information why, where to start?

Post by jordan »

Hey atle,
I got this working finally!
That's great to hear!
I wrote it up in my blog here: http://meandubuntu.wordpress.com/200...dio-from-wine/

But basically it involved setting the following in the registry for Wine:
[Software\\Wine\\Alsa Driver]
“AutoScanCards”=”N”
“DeviceCount”=”13
“DeviceCTL13=”default”
“DevicePCM13=”default”
“UseDirectHW”=”N”
Interesting, this makes sense to me now. I believe the default that
wine uses is just to autoscan your soundcard.
It seems it was grabbing the wrong thing and failing. So you had to
specifically tell it what to use via the Registry.
I wish i had thought to ask you about your registry + ALSA.

mine is quite a bit different than yours, mine autodetects (even my
multiple devices), and i have "UseDirectHW".

Jordan.
jordan

No sound, no information why, where to start?

Post by jordan »

Hey again,
Wine is great software. But I really wish information like this was available in documentation, and that winecfg would reply with some useful information when failing.
How windows-ish that Wine acts like that. lol. If you haven't read
it before the "useful registry keys" in the Wine wiki. Actually, is
quite helpful. It also lists ALL of the AlsaDriver keys that you had
to use. It also has lots of other useful info.
For example "Opening device 'something' failed".
I hear ya.

jordan
jordan

No sound, no information why, where to start?

Post by jordan »

On Tue, Sep 14, 2010 at 3:03 AM, atle <[email protected]> wrote:
Ya, I don't use KDE, i just naturally assume it plays a similar role
to Pulseaudio (which also can set sound).

Sorry, bad description on my part. kmix is an alsamixer equivalent for KDE. It doesn't play anything, or mix sound streams like dmix.
That makes sense...
That's kind of what i would expect to see.
I wouldn't. Where is gstreamer finding a default ALSA device that aplay can't find?
I never have had to use aplay, in my life...and ironically, I use
linux mostly for proaudio. And it does make sense to me, as that is
how alsamixer would show them, and that is how
Jack-audio-connection-kit would display them.
KDE, aplay, that's a whole other ball game. I have no idea whay that
would be different.
This is linked to the previous question, why can't aplay -L or KDE4/phonon/gstreamer find the devices I create in asound.conf?

I wish there would be some more consistency here.
The one and only time that i needed to create a device in asound.conf,
it worked just fine. but again, i am using a much different setup than
you.
Have you tried a fresh install of Wine??? you can do this simply by
renaming your .wine folder (as to not lose anything), then try
uninstalling Wine.

I'll try that. I have only tried removing .wine to recreate settings.
For you to not have changed anything, and
it just stopped working.

I didn't say that. I upgrade gentoo all the time. I even upgrade kernel now and then. Also I've changed from a ATI47** to an ATI56**. But these are steps that cannot easily be reversed.
Obviously not..... If your ATI56 has an audio device, maybe that was
the cause. Is that the point in which your problems began? Upgrades
can break things, but not likely when portage is configured correctly.
a new kernel wouldn't do that either, as no sound would work at all.
I install a new kernel, just about every week.
I use Zen-kernel with gentoo on one machine, and Zen + Fedora 13 on my
pro-audio machine.
Also, sound is working. It's just wine doing something strange. But I'll try reinstalling it tonight.

What I miss is something like what was used in the old ~/.wine/config:
[ALSA]
"PlaybackDevice" = "default"

(Ref: http://wiki.jswindle.com/index.php/Wine_Config_File)

If I found a way to do the same in the new .reg files, I'd be happy.
http://wiki.winehq.org/UsefulRegistryKeys

Definetly have a look through there. I mess with the registry all the
time, and feel quite comfortable doing it.
I even modify specific application registry keys, with they have keys
that potentially are worth modifying.
I've been able to get a few apps to work better doing this.

jordan
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Re: No sound, no information why, where to start?

Post by atle »

jordan wrote: Interesting, this makes sense to me now. I believe the default that
wine uses is just to autoscan your soundcard.
It seems it was grabbing the wrong thing and failing. So you had to
specifically tell it what to use via the Registry.
That makes sense because:

- Withouth /etc/asound.conf there is no "default" device. This is why I needed asound.conf in the first place. So if wine is scanning the hardware directly, it shouldn't find a default device either. And fail.
- And even with asound.conf aplay -L doesn't find the new defined devices. If Wine scans with the same method, it would get the same result.

What is strange though, is that this used to work. But maybe an upgrade to Wine has changed the way Wine looks for devices?

Or maybe there are some slight differences between my old and new graphics card, or an upgrade to ati-drivers has changed something. I haven't used Wine on a daily basis at home, so it's difficult to say exactly when things broke.
atle
Level 2
Level 2
Posts: 14
Joined: Sat Sep 11, 2010 6:48 am

Re: No sound, no information why, where to start?

Post by atle »

jordan wrote: How windows-ish that Wine acts like that. lol.
I've been thinking the same thing.

I have a wireless router at home. Win XP and Linux connects fine, but no Vista computer has ever been able to connect.

The fun thing is the information message: "Partially connected!" … Ok, that's helpfull! :D

ipconfig does show, though, that it got the default IP you get when you don't get dhcp.
jordan wrote: If you haven't read
it before the "useful registry keys" in the Wine wiki. Actually, is
quite helpful. It also lists ALL of the AlsaDriver keys that you had
to use. It also has lots of other useful info.
Yeah, I never found that when searching. My search-fu could obviously be improved.

Atle
jordan

No sound, no information why, where to start?

Post by jordan »

Hey atle,
What is strange though, is that this used to work. But maybe an upgrade to Wine has changed the way Wine looks for devices?
I don't think that is the case, as i always upgrade wine/compile new
versions, and never run into that.
Or maybe there are some slight differences between my old and new graphics card, or an upgrade to ati-drivers has changed something. I haven't used Wine on a daily basis at home, so it's difficult to say exactly when things broke.
Well, you do have multiple audio devices, do you specify which loads first????

For example, on my system the IntelHDA card is the first, while my
AkaiMPK49 loads second. If i don't have this configured, then if i
leave my USB-midi keyboard plugged in on boot. it will think that it's
the 1st device. Then, i won't be able to start Jack-audio. as It will
fail, and throw errors...but this way, the default will grab the right
device. That is probably why i never had issues with wine's defaults.
My defaults for my system, reflect exactly what i want.

options snd_hda_intel index=0

this is placed in a .conf file, in /etc/modprobe.d (on some distro's
it is /etc/modules)

You might want to do something similar if you end up having issues,
now that you are using both your soundcard, and your graphics card's
audio...

jordan
jordan

No sound, no information why, where to start?

Post by jordan »

Hey again,
I've been thinking the same thing.

I have a wireless router at home. Win XP and Linux connects fine, but no Vista computer has ever been able to connect.
That's because Vista is the worst. I don't run any version of
Windows, except winXP in vmware on my Mac. and i only do that, so that
i can install the odd application that Wine won't install, and then i
migrate the relevant registry keys, and files into wine. This has
worked for me a few times now! That's my only use for Windows. lol.

I much prefer using Linux. Which has worked out nicely, as most of the
commercial (windows) software i have purchased over the years - runs
under wine, pretty much perfect. and the one's that don't, i wouldn't
be really using that much anyway.... So for me, it is redundant to
bother with Windows.

I even prefer Linux to Mac.

jordan
Locked