Pulse audo in 1.3.25+

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Sat, Sep 3, 2011 at 6:53 PM, oiaohm <[email protected]> wrote:
err:alsa:wine_snd_pcm_recover underrun occurred

Yep confirmation of a pulseaudio shot gun if running in full. Since at or
near the fail a underrun happens. This is enough to crash or cause
pulseaudio to stop putting out audio on everything.
Reason why seeing this.
"ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun"
Tells us that pulseaudio will not recover from a underrun event and the err
above confirms the exist of that problem. Is basically a o that is why full
is not working moment.

"err:d3d:device_resource_released Buffer 0x2ea93b70 is still in use by
stateblock 0x1ba608 as index buffer. " That is a strange error.

Next item really requires running with pasuspender with wine set
emulation. Ok wine is going to hog the audio doing this due to no mixer in
most cases. But this does remove pulseaudio from mix.

If wine is still failing in pasuspender mode with wine set emulation then
its 100 percent a bug in wine alsa with the programs you are using.
pasuspender mode cannot have full either because you most likely not have a
mixer. So is a wine bug report.

If it works with pasuspender something from pulseaudio is messing with us.
So it is a bug report to pulseaudio due to there alsa emulation being
faulty for some reason.

Yes I had to get you using emulation before I could ask you todo the next
test. Full in pasuspender mode also fails in bad ways due to missing mixer.

Also some programs just switching on emulation make the problem with
pulseaudio disappear.





Doesn't matter right now, can't get ME2 to work now. Playing for ever.
Next step reinstall of OS. Sigh.

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Sat, Sep 3, 2011 at 9:19 PM, MacNean Tyrrell <[email protected]> wrote:

On Sat, Sep 3, 2011 at 6:53 PM, oiaohm <[email protected]> wrote:
err:alsa:wine_snd_pcm_recover underrun occurred

Yep confirmation of a pulseaudio shot gun if running in full. Since at or
near the fail a underrun happens. This is enough to crash or cause
pulseaudio to stop putting out audio on everything.
Reason why seeing this.
"ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun"
Tells us that pulseaudio will not recover from a underrun event and the
err above confirms the exist of that problem. Is basically a o that is why
full is not working moment.

"err:d3d:device_resource_released Buffer 0x2ea93b70 is still in use by
stateblock 0x1ba608 as index buffer. " That is a strange error.

Next item really requires running with pasuspender with wine set
emulation. Ok wine is going to hog the audio doing this due to no mixer in
most cases. But this does remove pulseaudio from mix.

If wine is still failing in pasuspender mode with wine set emulation then
its 100 percent a bug in wine alsa with the programs you are using.
pasuspender mode cannot have full either because you most likely not have a
mixer. So is a wine bug report.

If it works with pasuspender something from pulseaudio is messing with us.
So it is a bug report to pulseaudio due to there alsa emulation being
faulty for some reason.

Yes I had to get you using emulation before I could ask you todo the next
test. Full in pasuspender mode also fails in bad ways due to missing mixer.

Also some programs just switching on emulation make the problem with
pulseaudio disappear.





Doesn't matter right now, can't get ME2 to work now. Playing for ever.
Next step reinstall of OS. Sigh.

OK reinstalled 10.10 (can't stand unity in 11.04, not sure what I'm going to
do as 10.10 becomes outdated). Compiled pulseaudio/alsa-plugins from source
(aparantly there is a bug in Pulse that doesn't do well with alsa-pulse
plugin, that after awhile sound kills in pulse from alsa, so got .93 pulse
and 1.0.24 alsa-plugins installed right now on my machine (it's wierd, it
doesn't start correctly, I have to change hardware from duplex to single
back to duplex to get sound, but it works right now). So more testing of
1.3.27 alsa with wine and pulse.
--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Sun, Sep 4, 2011 at 5:14 PM, MacNean Tyrrell <[email protected]> wrote:

On Sat, Sep 3, 2011 at 9:19 PM, MacNean Tyrrell <[email protected]> wrote:

On Sat, Sep 3, 2011 at 6:53 PM, oiaohm <[email protected]> wrote:
err:alsa:wine_snd_pcm_recover underrun occurred

Yep confirmation of a pulseaudio shot gun if running in full. Since at
or near the fail a underrun happens. This is enough to crash or cause
pulseaudio to stop putting out audio on everything.
Reason why seeing this.
"ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun"
Tells us that pulseaudio will not recover from a underrun event and the
err above confirms the exist of that problem. Is basically a o that is why
full is not working moment.

"err:d3d:device_resource_released Buffer 0x2ea93b70 is still in use by
stateblock 0x1ba608 as index buffer. " That is a strange error.

Next item really requires running with pasuspender with wine set
emulation. Ok wine is going to hog the audio doing this due to no mixer in
most cases. But this does remove pulseaudio from mix.

If wine is still failing in pasuspender mode with wine set emulation then
its 100 percent a bug in wine alsa with the programs you are using.
pasuspender mode cannot have full either because you most likely not have a
mixer. So is a wine bug report.

If it works with pasuspender something from pulseaudio is messing with
us. So it is a bug report to pulseaudio due to there alsa emulation being
faulty for some reason.

Yes I had to get you using emulation before I could ask you todo the next
test. Full in pasuspender mode also fails in bad ways due to missing mixer.

Also some programs just switching on emulation make the problem with
pulseaudio disappear.





Doesn't matter right now, can't get ME2 to work now. Playing for ever.
Next step reinstall of OS. Sigh.

OK reinstalled 10.10 (can't stand unity in 11.04, not sure what I'm going
to do as 10.10 becomes outdated). Compiled pulseaudio/alsa-plugins from
source (aparantly there is a bug in Pulse that doesn't do well with
alsa-pulse plugin, that after awhile sound kills in pulse from alsa, so got
.93 pulse and 1.0.24 alsa-plugins installed right now on my machine (it's
wierd, it doesn't start correctly, I have to change hardware from duplex to
single back to duplex to get sound, but it works right now). So more
testing of 1.3.27 alsa with wine and pulse.
--
Sincerely,

MacNean C. Tyrrell
OK, obviously compiling my own pulse/alsa doesn't work. I get sound in all
applications except wine.

ALSA lib ../../../src/pcm/pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open
slave
ALSA lib ../../../src/pcm/pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open
slave



--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
tparker
Level 5
Level 5
Posts: 354
Joined: Tue Feb 24, 2009 3:06 pm

Pulse audo in 1.3.25+

Post by tparker »

On 09/04/2011 08:03 PM, MacNean Tyrrell wrote:
OK, obviously compiling my own pulse/alsa doesn't work. I get sound in all
applications except wine.
I don't have pulse installed and I have sound everywhere except in wine
since wine version 1.3.25. Is it possible that part of your problem is
the in-progress-but-not-completed changes to sound in wine? I haven't
had any luck tracking an answer down for that in my case am an not sure
how we would tell if that applied to your issue.
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Mon, Sep 5, 2011 at 8:54 AM, MacNean Tyrrell <[email protected]> wrote:

On Mon, Sep 5, 2011 at 8:42 AM, tparker <[email protected]> wrote:
On 09/04/2011 08:03 PM, MacNean Tyrrell wrote:
OK, obviously compiling my own pulse/alsa doesn't work. I get sound in
all
applications except wine.
I don't have pulse installed and I have sound everywhere except in wine
since wine version 1.3.25. Is it possible that part of your problem is the
in-progress-but-not-completed changes to sound in wine? I haven't had any
luck tracking an answer down for that in my case am an not sure how we would
tell if that applied to your issue.

If I upgrade to 11.04 Ubuntu (which has a newer Pulse server) I can get
sound for 30-40 minutes. However, there is a bug in libasound2-plugins
(basically alsa-plugins) that causes the alsa plugin to fail after awhile.
It's fixed in 11.10. I really hate unity, but like the simplicity of
ubuntu. So not sure what i'm gonna do right now.

Hmm sorry last one went to personal instead of wine-users. Also, I think
without pulse and straight up alsa, wine .25+ is supposed to just work.
--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Re: Pulse audo in 1.3.25+

Post by jorl17 »

MacNean Tyrrell wrote:On Mon, Sep 5, 2011 at 8:54 AM, MacNean Tyrrell <[email protected]> wrote:

On Mon, Sep 5, 2011 at 8:42 AM, tparker <[email protected]> wrote:
On 09/04/2011 08:03 PM, MacNean Tyrrell wrote:
I don't have pulse installed and I have sound everywhere except in wine
since wine version 1.3.25. Is it possible that part of your problem is the
in-progress-but-not-completed changes to sound in wine? I haven't had any
luck tracking an answer down for that in my case am an not sure how we would
tell if that applied to your issue.

If I upgrade to 11.04 Ubuntu (which has a newer Pulse server) I can get
sound for 30-40 minutes. However, there is a bug in libasound2-plugins
(basically alsa-plugins) that causes the alsa plugin to fail after awhile.
It's fixed in 11.10. I really hate unity, but like the simplicity of
ubuntu. So not sure what i'm gonna do right now.

Hmm sorry last one went to personal instead of wine-users. Also, I think
without pulse and straight up alsa, wine .25+ is supposed to just work.
--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
Can't you configure Pulseaudio to go through an ALSA device that uses dmix instead of talking to the hardware? Then you could have Wine use that device as well, bypassing pulse. You'd also setup the environment so that all the other apps would use the "pulse" device, which would lead to Pulse, which would lead to the dmix device, but with the advantages of Pulse.

Cheers,

Jorl17
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Mon, Sep 5, 2011 at 12:45 PM, jorl17 <[email protected]> wrote:
MacNean Tyrrell wrote:
On Mon, Sep 5, 2011 at 8:54 AM, MacNean Tyrrell <[email protected]>
wrote:

On Mon, Sep 5, 2011 at 8:42 AM, tparker <[email protected]>
wrote:
sound in
wine
is the
any
we would
If I upgrade to 11.04 Ubuntu (which has a newer Pulse server) I can get
sound for 30-40 minutes. However, there is a bug in libasound2-plugins
(basically alsa-plugins) that causes the alsa plugin to fail after
awhile.
It's fixed in 11.10. I really hate unity, but like the simplicity of
ubuntu. So not sure what i'm gonna do right now.


Hmm sorry last one went to personal instead of wine-users. Also, I think
without pulse and straight up alsa, wine .25+ is supposed to just work.

--
Sincerely,

MacNean C. Tyrrell


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://www.winehq.org/pipermail/wine-us ... hment.html


Can't you configure Pulseaudio to go through an ALSA device that uses dmix
instead of talking to the hardware? Then you could have Wine use that device
as well, bypassing pulse. You'd also setup the environment so that all the
other apps would use the "pulse" device, which would lead to Pulse, which
would lead to the dmix device, but with the advantages of Pulse.

I'm not sure I understand what you're saying. Or even if I semi do, not how
to implement it. I remember years ago when alsa and my sound cards didn't
like each other, and getting sound into linux at all was problematic for me.
Then when pulse was introduced with w/e Ubuntu release, I finally had great
sound support, but the alsa-plugin for pulse caused wow/vent to not like
each other, and even without vent up, eventually the sound would become
distorted over time. So I found the unsupported wine-pulse patch, that made
my life great, wine (WoW/Steam mainly) with sound through pulse. Perfect
sound all the way around.

Now I get rewriting the sound server for wine was a necessity, but it broke
the wine-pulse patches (which I'm not complaining about, just want to make
that known). So in order for me to keep up with greatest wine, I have to
use the alsa-plugin for pulse, but in 10.10 ubuntu the pulse server is too
old, and even in 11.04 the alsa-plugins have a bug where alsa plugin to
pulse looses sound after a time.

Don't want to go to 11.10, someone emailed me about Mint Linux, but I've
just got every machine in my house running Ubuntu (except 1 windows xp
licesnse I have for my skype landline phone (usb->phone jack)). So not sure
I want to jump ships just yet, and not even sure Mint Linux is running the
correct pulse/alsa-plugin patches.

So I either stick with 1.3.24 for now with wine-pulse patch, or try and
figure out how to upgrade pulse server/alsa-plugins (the other complication
is I need 32bit alsa plugins don't I? for Wine? I have 64bit OS, 32bit
wine. When I compiled my own Pulse, I got sound in everything but Wine.
Even google/flash/youtube/w/e created it's alsa-plugin in pulse, so
somewhere wine wasn't creating that plugin).

I know this is long, just explaining where I've been. Now your saying
create an alsa device and have pulse run through it? I guess I don't follow
completely.


Cheers,
Jorl17





--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

Let me try to make this clear.

Pulseaudio talks to ALSA. However, it is usually setup to talk to the ALSA device hw:0, which is the hardware. So, Pulseaudio hogs the hardware device and no other app can access it. This is ok, because ALSA is setup to route every other application (if that app is well configured) to another ALSA "device" called pulse, which, in turn, sends it to Pulseaudio. So when an application that uses ALSA directly runs, it goes like this:

App -> ALSA -> ALSA pulse device -> Pulseaudio -> ALSA hw:0 device (hardware).

Before Pulseaudio, as you may know, people used dmix to do software mixing. Sure, Pulseaudio offers a range of other features, but you can still use dmix today. The idea here is to have Wine "bypass" Pulseaudio completely, and talk to ALSA directly. To do this, Pulseaudio must stop "hogging" the hw:0 device, so it must go through another device we create called, for instance, dmixed. This dmixed device supports software mixing through dmix and, thus, can be accessed by Pulseaudio and other applications as well. It would still default to sending applications to Pulseaudio, but if you configured your application to request the dmixed device, you'd be bypassing the whole Pulseaudio "mess". So this is what would happen:

Regular App -> ALSA -> ALSA pulse device -> Pulseaudio -> ALSA dmixed -> hw:0 device (hardware).

Wine -> ALSA -> ALSA dmixed device -> hw:0 device (hardware)

Wine can be configured to do this with registry keys. The devices can be fairly easy created by editing the $HOME/.asoundrc file. The question here is how to redirect Pulseaudio to the ALSA dmixed device instead of the hw:0 one.

To be honest, since I moved to Gentoo I've left Pulseaudio completely. The only feature I missed was recording the PC sound and I've fixed that on my own with plain ALSA. However, I still remember doing something similar to this in ubuntu, so if it hasn't changed, you can change the default Pulseaudio alsa device from hw:0 by editing the /etc/pulse/default.pa file and adding the following at the end:
load-module module-alsa-source device=dsnoop:0
load-module module-alsa-sink device=dmixed:0

Of course this assumes that you have created a dsnoop device and a dmix device (in $HOME/.asoundrc). dsnoop allows for record software mixing and dmix for playback software mixing.

If you'd like to try this, do say, as it *might* help you solve your problems...let's just hope it doesn't add any other.

Cheers,
Jorl17
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Mon, Sep 5, 2011 at 1:28 PM, jorl17 <[email protected]> wrote:
Let me try to make this clear.

Pulseaudio talks to ALSA. However, it is usually setup to talk to the ALSA
device hw:0, which is the hardware. So, Pulseaudio hogs the hardware device
and no other app can access it. This is ok, because ALSA is setup to route
every other application (if that app is well configured) to another ALSA
"device" called pulse, which, in turn, sends it to Pulseaudio. So when an
application that uses ALSA directly runs, it goes like this:

App -> ALSA -> ALSA pulse device -> Pulseaudio -> ALSA hw:0 device
(hardware).

Before Pulseaudio, as you may know, people used dmix to do software mixing.
Sure, Pulseaudio offers a range of other features, but you can still use
dmix today. The idea here is to have Wine "bypass" Pulseaudio completely,
and talk to ALSA directly. To do this, Pulseaudio must stop "hogging" the
hw:0 device, so it must go through another device we create called, for
instance, dmixed. This dmixed device supports software mixing through dmix
and, thus, can be accessed by Pulseaudio and other applications as well. It
would still default to sending applications to Pulseaudio, but if you
configured your application to request the dmixed device, you'd be bypassing
the whole Pulseaudio "mess". So this is what would happen:

Regular App -> ALSA -> ALSA pulse device -> Pulseaudio -> ALSA dmixed ->
hw:0 device (hardware).

Wine -> ALSA -> ALSA dmixed device -> hw:0 device (hardware)

Wine can be configured to do this with registry keys. The devices can be
fairly easy created by editing the $HOME/.asoundrc file. The question here
is how to redirect Pulseaudio to the ALSA dmixed device instead of the hw:0
one.

To be honest, since I moved to Gentoo I've left Pulseaudio completely. The
only feature I missed was recording the PC sound and I've fixed that on my
own with plain ALSA. However, I still remember doing something similar to
this in ubuntu, so if it hasn't changed, you can change the default
Pulseaudio alsa device from hw:0 by editing the /etc/pulse/default.pa file
and adding the following at the end:
load-module module-alsa-source device=dsnoop:0
load-module module-alsa-sink device=dmixed:0

Of course this assumes that you have created a dsnoop device and a dmix
device (in $HOME/.asoundrc). dsnoop allows for record software mixing and
dmix for playback software mixing.

If you'd like to try this, do say, as it *might* help you solve your
problems...let's just hope it doesn't add any other.

I Think I may try this. I'll have to refresh my memory (ie google) on how
to create a good .asoundrc file again. Ty for the information/help. Will
let you know how I make out.

Cheers,
Jorl17





--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

If you need help, don't mind asking!
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Post by dardack »

OK WTF, I sent 2 emails yesterday. Didn't get any responses, so decided to just check out the forum. They aren't here. Sigh. Ok here is what I wrote:


OK looks like i need help. I got sound to work in both this way:

in /etc/pulse/default.pa

comment out:
#load-module module-udev-detect
#load-module module-suspend-on-idle

Added:


load-module module-alsa-source device=dsnoop
load-module module-alsa-sink device=dmix


no asoundrc file needed (in fact even when I put a asoundrc such as partial: pcm.!default {
type plug
slave.pcm "dmixer"
}
....

if i cchanged dmix to dmixer it wouldn't work. Maybe I'm doing something wrong with the .asoundrc file.

OK so sound works, but my mic doesn't. If I unmute it in alsamixer, it goes straight to my headphones, no recoding software picks it up.

Also no sound in virtualbox anymore so far That i've discovered don't work, Flash player in Chrome doesn't work (didn't try firefox). VLC/Totem work.

On Mon, Sep 5, 2011 at 3:16 PM, jorl17 <[email protected]> wrote:
If you need help, don't mind asking!

(TY for this, Cause looks like I will).


2nd email:

OK thinking. I ptu in the default default.pa back, then I booted, ran the padevchooser (or the manager w/e it's called). I see this under sink/source/devices/modules:

module-alsa-card device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" tsched=yes ignore_db=no_card_properties="module-udev-detect.discovered=1"

Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo

Could I somehow use this information to get mic/better alsa output support?
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

dardack wrote:OK WTF, I sent 2 emails yesterday. Didn't get any responses, so decided to just check out the forum. They aren't here. Sigh. Ok here is what I wrote:


OK looks like i need help. I got sound to work in both this way:

in /etc/pulse/default.pa

comment out:
#load-module module-udev-detect
#load-module module-suspend-on-idle

Added:


load-module module-alsa-source device=dsnoop
load-module module-alsa-sink device=dmix


no asoundrc file needed (in fact even when I put a asoundrc such as partial: pcm.!default {
type plug
slave.pcm "dmixer"
}
....

if i cchanged dmix to dmixer it wouldn't work. Maybe I'm doing something wrong with the .asoundrc file.
Hm... Was that the essential change you added in the asoundrc file? Because if that was it then it's normal for it not work. Not only are you changing the default device (which you shouldn't do, as it should *still* point to pulse), but you're also not creating the dmixer device, (I think). I don't know why you don't get sound. It's puzzling me, to be honest. My suggestion is that of manually creating a dsnoop-based device. try to insert this in the .asoundrc file:

Code: Select all

pcm.dsnooped {
	type dsnoop
	ipc_key 2048 #Any value at random. Really, any value.
	slave {
		pcm "hw:0" #Or whatever your card is
	}
}
Then, instead of adding dsnoop in that line, add dsnooped. See if it works. If it doesn't and if you *don't* need Wine to pick up your microphone, you could just have Pulseaudio access your sound card directly for recording, using hw:0.

I'd recommend you to do the same for a dmix device:

Code: Select all

pcm.dmixed {
	type dmix
		ipc_key 5678293 #Any value at random. Really, any value.
		ipc_perm 0666
		slave {
			pcm "hw:0" #Or whatever your card is
# These are all optional and are here for fine-tunning later on.
#			period_time 0
#			period_size 8192 
#			buffer_size 32768
#			rate 48000
#			format S16_LE
		}
}
Then, create a "duplex" device to join these together:

Code: Select all

pcm.duplex_for_pulse {
	type plug
	slave {
		pcm {
			type asym
			playback.pcm "dmixed"
			capture.pcm  "dsnooped"
		}
	}
}
Now use that device in both lines in the pulseaudio file. See if that works.

Make sure that you don't change the default device, or even anything pulse related. default should still point to pulse, otherwise nothing will go through pulseaudio and things might get really nasty.
dardack wrote: OK so sound works, but my mic doesn't. If I unmute it in alsamixer, it goes straight to my headphones, no recoding software picks it up.

Also no sound in virtualbox anymore so far That i've discovered don't work, Flash player in Chrome doesn't work (didn't try firefox). VLC/Totem work.
See above.
dardack wrote: 2nd email:

OK thinking. I ptu in the default default.pa back, then I booted, ran the padevchooser (or the manager w/e it's called). I see this under sink/source/devices/modules:

module-alsa-card device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" tsched=yes ignore_db=no_card_properties="module-udev-detect.discovered=1"

Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo

Could I somehow use this information to get mic/better alsa output support?
I don't think that's of any use at all. At least not for now. Also, you don't need to reboot, as you probably know. You only have to kill pulseaudio and restart it. (I'm not sure if there's a service for it in Ubuntu).

Cheers,

Jorl17[/code]
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Pulse audo in 1.3.25+

Post by dardack »

Trying email response once more, will check forums to see.

On Tue, Sep 6, 2011 at 3:03 PM, jorl17 <[email protected]> wrote:
dardack wrote:
OK WTF, I sent 2 emails yesterday. Didn't get any responses, so decided
to just check out the forum. They aren't here. Sigh. Ok here is what I
wrote:

OK looks like i need help. I got sound to work in both this way:

in /etc/pulse/default.pa

comment out:
#load-module module-udev-detect
#load-module module-suspend-on-idle

Added:


load-module module-alsa-source device=dsnoop
load-module module-alsa-sink device=dmix


no asoundrc file needed (in fact even when I put a asoundrc such as
partial: pcm.!default {
type plug
slave.pcm "dmixer"
}
....

if i cchanged dmix to dmixer it wouldn't work. Maybe I'm doing something
wrong with the .asoundrc file.


Hm... Was that the essential change you added in the asoundrc file? Because
if that was it then it's normal for it not work. Not only are you changing
the default device (which you shouldn't do, as it should *still* point to
pulse), but you're also not creating the dmixer device, (I think). I don't
know why you don't get sound. It's puzzling me, to be honest. My suggestion
is that of manually creating a dsnoop-based device. try to insert this in
the .asoundrc file:


Code:
pcm.dsnooped {
type dsnoop
ipc_key 2048 #Any value at random. Really, any value.
slave {
pcm "hw:0" #Or whatever your card is
}
}



Then, instead of adding dsnoop in that line, add dsnooped. See if it works.
If it doesn't and if you *don't* need Wine to pick up your microphone, you
could just have Pulseaudio access your sound card directly for recording,
using hw:0.

I'd recommend you to do the same for a dmix device:


Code:
pcm.dmixed {
type dmix
ipc_key 5678293 #Any value at random. Really, any value.
ipc_perm 0666
slave {
pcm "hw:0" #Or whatever your card is
# These are all optional and are here for fine-tunning later on.
# period_time 0
# period_size 8192
# buffer_size 32768
# rate 48000
# format S16_LE
}
}



Then, create a "duplex" device to join these together:


Code:
pcm.duplex_for_pulse {
type plug
slave {
pcm {
type asym
playback.pcm "dmixed"
capture.pcm "dsnooped"
}
}
}



Now use that device in both lines in the pulseaudio file. See if that
works.

Make sure that you don't change the default device, or even anything pulse
related. default should still point to pulse, otherwise nothing will go
through pulseaudio and things might get really nasty.


OK, i think I understand, I want an .asoundrc file start blank, then put in:

Code: Select all

pcm.dsnooped {
type dsnoop
ipc_key 2048 #Any value at random. Really, any value.
slave {
pcm "hw:0" #Or whatever your card is
}
}
*#it's hw0:0 no?*
*
*
pcm.dmixed {
type dmix
ipc_key 5678293 #Any value at random. Really, any value.
ipc_perm 0666
slave {
pcm "hw:0" #Or whatever your card is
# These are all optional and are here for fine-tunning later on.
#                       period_time 0
#                       period_size 8192
#                       buffer_size 32768
#                       rate 48000
#                       format S16_LE
}
}

pcm.duplex_for_pulse {
type plug
slave {
pcm {
type asym
playback.pcm "dmixed"
capture.pcm  "dsnooped"
}
}
}
Save it to my ~/ directory.

Then edit /etc/pulse/default.pa and add:

Code: Select all

load-module module-alsa-sink device=duplex_for_pulse
load-module module-alsa-source device=duplex_for_pulse
Do I have to comment out the udev/idle lines?

dardack wrote:
OK so sound works, but my mic doesn't. If I unmute it in alsamixer, it
goes straight to my headphones, no recoding software picks it up.
Also no sound in virtualbox anymore so far That i've discovered don't
work, Flash player in Chrome doesn't work (didn't try firefox). VLC/Totem
work.


See above.


dardack wrote:
2nd email:

OK thinking. I ptu in the default default.pa back, then I booted, ran
the padevchooser (or the manager w/e it's called). I see this under
sink/source/devices/modules:
module-alsa-card device_id="0" name="pci-0000_00_1b.0"
card_name="alsa_card.pci-0000_00_1b.0" tsched=yes
ignore_db=no_card_properties="module-udev-detect.discovered=1"
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo

Could I somehow use this information to get mic/better alsa output
support?


I don't think that's of any use at all. At least not for now. Also, you
don't need to reboot, as you probably know. You only have to kill pulseaudio
and restart it. (I'm not sure if there's a service for it in Ubuntu).

I thought this, i would do a sudo service pulseaudio restart, it would say
pulseaudio user something i forget. Maybe I needed a sudo pulseaudio -k.
Not sure. I would log out and back in, and most things in asoundrc would
take affect, but not all things in default.pa all the time. I know I had to
reboot for changes with certain things to actually take place. Not always,
like I could remove the alsa-sink and add it and pulse would get/loose
sound. But it was weird.

Um at work right now, but will definetely try this later. I at least know
messing with default.pa/asoundrc doesn't make me reinstall the OS. I tried
upgrading pulse/alsa-plugins to the unbugged versions, with new deb's,
installing the new dependencies, but it always wanted to remvoe gnome
eventually, then sound just stopped working, I could never get it back.
Reinstalled OS twice trying to get things working with wine/alsa/pulse in
Ubuntu (I mean perfectly, loosing sound after 30 minutes isn't acceptable to
me personally). So at least with this, I was able to restore original
default.pa, remove asoundrc and sound works like a fresh install again.

Cheers,
Jorl17[/code]



Appreciate your help a ton. Btw does [/code] work on the forums properly?



--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Post by dardack »

Hmmm using [/code] in email doesn't work as well as posting on the forums I see. Anyways I see the forum got my email, but I guess there's discussion about splitting the two, guess I'll have to add this to one of my startup tabs.
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

Pulse audo in 1.3.25+

Post by jjmckenzie »

On Tue, Sep 6, 2011 at 12:23 PM, dardack <[email protected]> wrote:
Hmmm using [/code] in email doesn't work as well as posting on the forums I see.  Anyways I see the forum got my email, but
I guess there's discussion about splitting the two, guess I'll have to add this to one of my startup tabs.
It does. Use

Code: Select all


to open a code block

to close it on a separate lines from the block you want to show as code.

James
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

Hi. You .asoundrc seems fine. Note that applying asoundrc changes doesn't mean pulseaudio also applied its changes. ALSA can be restarted via a service, I'm sure. Pulseaudio I don't know. In my ubuntu days I just killed pulseaudio and manually typed pulseaudio. If you say it complains it's probably because it doesn't want to run as root. (which service probably does).

I don't think you have to/should uncomment those two lines, because they are there to help pulseaudio detect the underlying hardware (the udev one) and the other one is just plain useless unless you want to save energy.

Once you've tried it out, be sure to tell us if it worked!

Jorl17

P.S: the last [/code] got in the message by mistake. Code tags do work, but you obviously have to open them before closing them ^^
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Pulse audo in 1.3.25+

Post by dardack »

Laptop:~$ pulseaudio
E: module.c: Failed to load module "module-alsa-source" (argument:
"device=duplex_for_pulse"): initialization failed.
E: main.c: Module load failed.
E: main.c: Failed to initialize daemon.


i've added it as .asoundrc and /etc/asound.conf, still no go

On Tue, Sep 6, 2011 at 6:51 PM, jorl17 <[email protected]> wrote:
Hi. You .asoundrc seems fine. Note that applying asoundrc changes doesn't
mean pulseaudio also applied its changes. ALSA can be restarted via a
service, I'm sure. Pulseaudio I don't know. In my ubuntu days I just killed
pulseaudio and manually typed pulseaudio. If you say it complains it's
probably because it doesn't want to run as root. (which service probably
does).

I don't think you have to/should uncomment those two lines, because they
are there to help pulseaudio detect the underlying hardware (the udev one)
and the other one is just plain useless unless you want to save energy.

Once you've tried it out, be sure to tell us if it worked!

Jorl17

P.S: the last [/code] got in the message by mistake. Code tags do work, but
you obviously have to open them before closing them ^^





--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Post by dardack »

Laptop:~$ aplay -D duplex_for_pulse Miley_Cyrus-Party_In_The_USAshort.wav
Playing WAVE 'Miley_Cyrus-Party_In_The_USAshort.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt...


That works, the abort was me cutting it short.
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

dardack wrote:Laptop:~$ aplay -D duplex_for_pulse Miley_Cyrus-Party_In_The_USAshort.wav
Playing WAVE 'Miley_Cyrus-Party_In_The_USAshort.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt...


That works, the abort was me cutting it short.
If rebooting doesn't work, kill pulseaudio and try to start it with pulseaudio -vv for mose verbose info
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Post by dardack »

OMG may have got it. Finishing the closer episode on mythtv with wife. Will let you know.
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Post by dardack »

OK, so I had to comment out the udev part, but not the idle part.

However, wine is still creating alsa-plugins in pulse. I don't think it's communicating directly to alsa hw. How do i make it choose alsa hw over pulse.

I did find an update alsa-driver/plugin ppa for 10.04. Trying it out, but still it's a alsa plugin into pulse with wine, would like to skin this.
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Pulse audo in 1.3.25+

Post by dardack »

On Tue, Sep 6, 2011 at 10:00 PM, dardack <[email protected]> wrote:
OK, so I had to comment out the udev part, but not the idle part.

However, wine is still creating alsa-plugins in pulse. I don't think it's
communicating directly to alsa hw. How do i make it choose alsa hw over
pulse.

I did find an update alsa-driver/plugin ppa for 10.04. Trying it out, but
still it's a alsa plugin into pulse with wine, would like to skin this.





Ok the ppa was working until i rebooted. Now whatever grabs the sound
first has sound. If a reg app grabs it, wine doesn't, if wine grabs it,
reg apps don't get it. They show up (reg apps) in applications under sound
pref's, but now sound, until wine releases.


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Re: Pulse audo in 1.3.25+

Post by jorl17 »

dardack wrote:On Tue, Sep 6, 2011 at 10:00 PM, dardack <[email protected]> wrote:
OK, so I had to comment out the udev part, but not the idle part.

However, wine is still creating alsa-plugins in pulse. I don't think it's
communicating directly to alsa hw. How do i make it choose alsa hw over
pulse.

I did find an update alsa-driver/plugin ppa for 10.04. Trying it out, but
still it's a alsa plugin into pulse with wine, would like to skin this.





Ok the ppa was working until i rebooted. Now whatever grabs the sound
first has sound. If a reg app grabs it, wine doesn't, if wine grabs it,
reg apps don't get it. They show up (reg apps) in applications under sound
pref's, but now sound, until wine releases.


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
Ok. Now this may be some kind of Wine-Pulseaudio incompatibility again. So what we're going to do is use Wine's settings to force it to use the duplex_for_pulse device, instead of the default one, which points to pulse.

This is farily easy, according to the ALSA keys in http://wiki.winehq.org/UsefulRegistryKeys

For instance here's an example:

[Software\\Wine\\Alsa Driver] 1315011634
"AutoScanCards"="N"
"AutoScanDevices"="N"
"DeviceCount"="1"
"DeviceCTL1"="duplex_for_pulse"
"DevicePCM1"="duplex_for_pulse"
"UseDirectHW"="N"

However, I think you might run into an issue due to not having defined a ctl.duplex_for_pulse, but we'll get there. For now just create those entries so that they match this. BTW, it isn't advised, but you can paste that snippet in the ~/.wine/user.reg file at the end (be sure to back it up first!) and it should work. To make sure you're testing wine's sound, do a wineserver -k and then open up winecfg to test the sound.

Cheers,
Jorl17
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Pulse audo in 1.3.25+

Post by dardack »

Doesn't work. I may have been premature. 1.3.24 works fine. 1.3.27 gives
no sound at all.

On Tue, Sep 6, 2011 at 11:31 PM, jorl17 <[email protected]> wrote:
dardack wrote:
On Tue, Sep 6, 2011 at 10:00 PM, dardack <[email protected]>
wrote:
OK, so I had to comment out the udev part, but not the idle part.

However, wine is still creating alsa-plugins in pulse. I don't think
it's
communicating directly to alsa hw. How do i make it choose alsa hw
over
pulse.

I did find an update alsa-driver/plugin ppa for 10.04. Trying it out,
but
still it's a alsa plugin into pulse with wine, would like to skin this.





Ok the ppa was working until i rebooted. Now whatever grabs the sound
first has sound. If a reg app grabs it, wine doesn't, if wine grabs it,
reg apps don't get it. They show up (reg apps) in applications under
sound
pref's, but now sound, until wine releases.


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://www.winehq.org/pipermail/wine-us ... hment.html


Ok. Now this may be some kind of Wine-Pulseaudio incompatibility again. So
what we're going to do is use Wine's settings to force it to use the
duplex_for_pulse device, instead of the default one, which points to pulse.

This is farily easy, according to the ALSA keys in
http://wiki.winehq.org/UsefulRegistryKeys

For instance here's an example:

[Software\\Wine\\Alsa Driver] 1315011634
"AutoScanCards"="N"
"AutoScanDevices"="N"
"DeviceCount"="1"
"DeviceCTL1"="duplex_for_pulse"
"DevicePCM1"="duplex_for_pulse"
"UseDirectHW"="N"

However, I think you might run into an issue due to not having defined a
ctl.duplex_for_pulse, but we'll get there. For now just create those entries
so that they match this. BTW, it isn't advised, but you can paste that
snippet in the ~/.wine/user.reg file at the end (be sure to back it up
first!) and it should work. To make sure you're testing wine's sound, do a
wineserver -k and then open up winecfg to test the sound.

Cheers,
Jorl17





--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
dardack
Level 3
Level 3
Posts: 98
Joined: Mon Sep 05, 2011 3:24 pm

Pulse audo in 1.3.25+

Post by dardack »

I do get ALSA lib ../../../src/control/control.c:882:(snd_ctl_open_noupdate)
Invalid CTL duplex_for_pulse

but in both .24 .27, with or without reg edit.

On Wed, Sep 7, 2011 at 12:02 AM, MacNean Tyrrell <[email protected]> wrote:
Doesn't work. I may have been premature. 1.3.24 works fine. 1.3.27 gives
no sound at all.


On Tue, Sep 6, 2011 at 11:31 PM, jorl17 <[email protected]> wrote:
dardack wrote:
On Tue, Sep 6, 2011 at 10:00 PM, dardack <[email protected]>
wrote:
it's
over
but
this.
first has sound. If a reg app grabs it, wine doesn't, if wine grabs it,
reg apps don't get it. They show up (reg apps) in applications under
sound
pref's, but now sound, until wine releases.


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://www.winehq.org/pipermail/wine-us ... hment.html


Ok. Now this may be some kind of Wine-Pulseaudio incompatibility again. So
what we're going to do is use Wine's settings to force it to use the
duplex_for_pulse device, instead of the default one, which points to pulse.

This is farily easy, according to the ALSA keys in
http://wiki.winehq.org/UsefulRegistryKeys

For instance here's an example:

[Software\\Wine\\Alsa Driver] 1315011634
"AutoScanCards"="N"
"AutoScanDevices"="N"
"DeviceCount"="1"
"DeviceCTL1"="duplex_for_pulse"
"DevicePCM1"="duplex_for_pulse"
"UseDirectHW"="N"

However, I think you might run into an issue due to not having defined a
ctl.duplex_for_pulse, but we'll get there. For now just create those entries
so that they match this. BTW, it isn't advised, but you can paste that
snippet in the ~/.wine/user.reg file at the end (be sure to back it up
first!) and it should work. To make sure you're testing wine's sound, do a
wineserver -k and then open up winecfg to test the sound.

Cheers,
Jorl17





--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
Locked