All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue with Alsa and PulseAudio
@ 2008-08-26  8:30 Ash
  2008-08-26 15:21 ` Colin Guthrie
  2009-02-11  6:49 ` Ludovico Cavedon
  0 siblings, 2 replies; 9+ messages in thread
From: Ash @ 2008-08-26  8:30 UTC (permalink / raw)
  To: alsa-devel


Hello,
I have a media application that uses alsa as its sound renderer. It has worked on numerous systems without any problems until I came across a mandriva distro that bundles with PulseAudio. The alsa pulseaudio plugin is installed correctly, however I am having weird problems.
 
When I am setting up my hw params, and I call snd_pcm_hw_params_any(), I get an "Operation not permitted" error. I am not sure why this is happening, anyone else see this before? I am using pulseaudio version 0.9.9 and alsa 1.0.16.
 
Thanks in advance!
_________________________________________________________________
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26  8:30 Issue with Alsa and PulseAudio Ash
@ 2008-08-26 15:21 ` Colin Guthrie
  2008-08-26 15:32   ` Takashi Iwai
  2009-02-11  6:49 ` Ludovico Cavedon
  1 sibling, 1 reply; 9+ messages in thread
From: Colin Guthrie @ 2008-08-26 15:21 UTC (permalink / raw)
  To: alsa-devel

Hi Ash,

Ash wrote:
> Hello, I have a media application that uses alsa as its sound
> renderer. It has worked on numerous systems without any problems
> until I came across a mandriva distro that bundles with PulseAudio.
> The alsa pulseaudio plugin is installed correctly, however I am
> having weird problems.
> 
> When I am setting up my hw params, and I call
> snd_pcm_hw_params_any(), I get an "Operation not permitted" error. I
> am not sure why this is happening, anyone else see this before? I am
> using pulseaudio version 0.9.9 and alsa 1.0.16.
> 
> Thanks in advance!

I'm the Mandriva PulseAudio maintainer. Most distros are now shipping PA 
by default now so I doubt your problem will be specific to Mandriva :)

However, I'm not expert enough in the ALSA API to know specifically what 
snd_pcm_hw_params_any() actually does, but I'd imagine (this is just a 
guess) that this is something that is either not implemented in the 
IOPLUG system (on which the pulseaudio alsa plugin builds) or something 
not implemented in the pulseaudio alsa plugin itself.

Hopefully someone more versed in this can explain the reason why it 
fails. :)

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26 15:21 ` Colin Guthrie
@ 2008-08-26 15:32   ` Takashi Iwai
  2008-08-26 15:39     ` Colin Guthrie
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2008-08-26 15:32 UTC (permalink / raw)
  To: Colin Guthrie; +Cc: alsa-devel, Ash

At Tue, 26 Aug 2008 16:21:13 +0100,
Colin Guthrie wrote:
> 
> Hi Ash,
> 
> Ash wrote:
> > Hello, I have a media application that uses alsa as its sound
> > renderer. It has worked on numerous systems without any problems
> > until I came across a mandriva distro that bundles with PulseAudio.
> > The alsa pulseaudio plugin is installed correctly, however I am
> > having weird problems.
> > 
> > When I am setting up my hw params, and I call
> > snd_pcm_hw_params_any(), I get an "Operation not permitted" error. I
> > am not sure why this is happening, anyone else see this before? I am
> > using pulseaudio version 0.9.9 and alsa 1.0.16.
> > 
> > Thanks in advance!
> 
> I'm the Mandriva PulseAudio maintainer. Most distros are now shipping PA 
> by default now so I doubt your problem will be specific to Mandriva :)
> 
> However, I'm not expert enough in the ALSA API to know specifically what 
> snd_pcm_hw_params_any() actually does, but I'd imagine (this is just a 
> guess) that this is something that is either not implemented in the 
> IOPLUG system (on which the pulseaudio alsa plugin builds) or something 
> not implemented in the pulseaudio alsa plugin itself.
> 
> Hopefully someone more versed in this can explain the reason why it 
> fails. :)

There is no alsa-lib code that returns -EPERM by itself.
Usually this error comes from the ioctl, but in this case, it must be
from pulse plugin.  And, pcm_pulse.c contains no EPERM, it must come
from the pulseaudio itself.

So, my rough guess is that PA is running by a different user
(e.g. root) that doesn't allow you to connect it.

Of course, first I'd do is to upgrade alsa-lib and alsa-plugins.
1.0.16 is fairly old.


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26 15:32   ` Takashi Iwai
@ 2008-08-26 15:39     ` Colin Guthrie
  2008-08-26 15:58       ` Takashi Iwai
                         ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Colin Guthrie @ 2008-08-26 15:39 UTC (permalink / raw)
  Cc: alsa-devel, Ash

Takashi Iwai wrote:
> There is no alsa-lib code that returns -EPERM by itself.
> Usually this error comes from the ioctl, but in this case, it must be
> from pulse plugin.  And, pcm_pulse.c contains no EPERM, it must come
> from the pulseaudio itself.
> 
> So, my rough guess is that PA is running by a different user
> (e.g. root) that doesn't allow you to connect it.

Interesting analysis, thanks Takashi.

Ash, if you want me to help with debugging, I am usually on 
#mandriva-cooker and #pulseaudio on IRC (nick coling).

If I don't answer after a ping it means I'm not there!

> Of course, first I'd do is to upgrade alsa-lib and alsa-plugins.
> 1.0.16 is fairly old.

Ash, if you think this would help, I can backport these two packages on 
Mandriva for the 2008.1 version but the driver will have to remain at 
1.0.16. (actually a current backport would get the 1.0.18rc2's).

And Takashi, do you age faster than most humans? 1.0.17 only went final 
few weeks ago!!! (although I accept there have been several good 
bugfixes since!!)


Cheers

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26 15:39     ` Colin Guthrie
@ 2008-08-26 15:58       ` Takashi Iwai
  2008-08-26 15:58       ` Takashi Iwai
  2008-08-26 17:08       ` Ash
  2 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2008-08-26 15:58 UTC (permalink / raw)
  To: Colin Guthrie; +Cc: alsa-devel, Ash

At Tue, 26 Aug 2008 16:39:25 +0100,
Colin Guthrie wrote:
> 
> > Of course, first I'd do is to upgrade alsa-lib and alsa-plugins.
> > 1.0.16 is fairly old.
> 
> Ash, if you think this would help, I can backport these two packages on 
> Mandriva for the 2008.1 version but the driver will have to remain at 
> 1.0.16. (actually a current backport would get the 1.0.18rc2's).

This shouldn't be a problem as long as you use PA.

> And Takashi, do you age faster than most humans? 1.0.17 only went final 
> few weeks ago!!! (although I accept there have been several good 
> bugfixes since!!)

Well, I thought he mentioned alsa-*lib* 1.0.16.  Actually it wasn't
certain what version was that...


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26 15:39     ` Colin Guthrie
  2008-08-26 15:58       ` Takashi Iwai
@ 2008-08-26 15:58       ` Takashi Iwai
  2008-08-26 17:08       ` Ash
  2 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2008-08-26 15:58 UTC (permalink / raw)
  To: Colin Guthrie; +Cc: alsa-devel, Ash

At Tue, 26 Aug 2008 16:39:25 +0100,
Colin Guthrie wrote:
> 
> > Of course, first I'd do is to upgrade alsa-lib and alsa-plugins.
> > 1.0.16 is fairly old.
> 
> Ash, if you think this would help, I can backport these two packages on 
> Mandriva for the 2008.1 version but the driver will have to remain at 
> 1.0.16. (actually a current backport would get the 1.0.18rc2's).

This shouldn't be a problem as long as you use PA.

> And Takashi, do you age faster than most humans? 1.0.17 only went final 
> few weeks ago!!! (although I accept there have been several good 
> bugfixes since!!)

Well, I thought he mentioned alsa-*lib* 1.0.16.  Actually it wasn't
certain what version was that...


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26 15:39     ` Colin Guthrie
  2008-08-26 15:58       ` Takashi Iwai
  2008-08-26 15:58       ` Takashi Iwai
@ 2008-08-26 17:08       ` Ash
  2008-08-26 22:13         ` Colin Guthrie
  2 siblings, 1 reply; 9+ messages in thread
From: Ash @ 2008-08-26 17:08 UTC (permalink / raw)
  To: alsa-devel


Thanks Colin, Takashi.
 
The thing is, I've noticed other applications such as aplay or amarok call the same function and not exhibit the same behavior. That's why I am  not sure what I am doing wrong.
 
Also intersetingly enough, if I do not use the "default" ALSA_DEVICE_DEFAULT, and instead use "front" (which I believe is direct access to alsa driver, whereas "default" goes through pulseaudio), strange things happen. For example, setting a rate or channels returns -22 Invalid Argument.
 
I am not sure if I need to change or upgrade alsa. I just want to get to the bottom of this with existing pulseaudio/alsa since other players seem to work.> To: alsa-devel@alsa-project.org> From: gmane@colin.guthr.ie> Date: Tue, 26 Aug 2008 16:39:25 +0100> CC: alsa-devel@alsa-project.org; hashbrown100@hotmail.com> Subject: Re: [alsa-devel] Issue with Alsa and PulseAudio> > Takashi Iwai wrote:> > There is no alsa-lib code that returns -EPERM by itself.> > Usually this error comes from the ioctl, but in this case, it must be> > from pulse plugin. And, pcm_pulse.c contains no EPERM, it must come> > from the pulseaudio itself.> > > > So, my rough guess is that PA is running by a different user> > (e.g. root) that doesn't allow you to connect it.> > Interesting analysis, thanks Takashi.> > Ash, if you want me to help with debugging, I am usually on > #mandriva-cooker and #pulseaudio on IRC (nick coling).> > If I don't answer after a ping it means I'm not there!> > > Of course, first I'd do is to upgrade alsa-lib and alsa-plugins.> > 1.0.16 is fairly old.> > Ash, if you think this would help, I can backport these two packages on > Mandriva for the 2008.1 version but the driver will have to remain at > 1.0.16. (actually a current backport would get the 1.0.18rc2's).> > And Takashi, do you age faster than most humans? 1.0.17 only went final > few weeks ago!!! (although I accept there have been several good > bugfixes since!!)> > > Cheers> > Col> > > -- > > Colin Guthrie> gmane(at)colin.guthr.ie> http://colin.guthr.ie/> > Day Job:> Tribalogic Limited [http://www.tribalogic.net/]> Open Source:> Mandriva Linux Contributor [http://www.mandriva.com/]> PulseAudio Hacker [http://www.pulseaudio.org/]> Trac Hacker [http://trac.edgewall.org/]> > _______________________________________________> Alsa-devel mailing list> Alsa-devel@alsa-project.org> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_________________________________________________________________
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26 17:08       ` Ash
@ 2008-08-26 22:13         ` Colin Guthrie
  0 siblings, 0 replies; 9+ messages in thread
From: Colin Guthrie @ 2008-08-26 22:13 UTC (permalink / raw)
  To: alsa-devel

Ash wrote:
> Thanks Colin, Takashi.
> 
> The thing is, I've noticed other applications such as aplay or amarok
> call the same function and not exhibit the same behavior. That's why
> I am  not sure what I am doing wrong.

Well amarok presumably uses xine... aplay tho' is probably more 
interesting. I presume you are passing the same values etc. as e.g. aplay?

> 
> Also intersetingly enough, if I do not use the "default"
> ALSA_DEVICE_DEFAULT, and instead use "front" (which I believe is
> direct access to alsa driver, whereas "default" goes through
> pulseaudio), strange things happen. For example, setting a rate or
> channels returns -22 Invalid Argument.

Don't use "front", you should use "default". "front" will only exist on 
some sound hardware AFAIK, and in the case that the user has selected 
their "default" device to route through pulseaudio, you should respect this.

I'm sure there is probably a technical reason why "front" does not let 
you set rate or channels (probably because it represents the front 
speakers system of a multi-channel setup), but I'm sure someone more 
familiar with the API will be able to enlighten you :)

> I am not sure if I need to change or upgrade alsa. I just want to get
> to the bottom of this with existing pulseaudio/alsa since other
> players seem to work.

Indeed. If aplay is calling this function and works via pulseaudio, then 
it stands to reason so should you!

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Issue with Alsa and PulseAudio
  2008-08-26  8:30 Issue with Alsa and PulseAudio Ash
  2008-08-26 15:21 ` Colin Guthrie
@ 2009-02-11  6:49 ` Ludovico Cavedon
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovico Cavedon @ 2009-02-11  6:49 UTC (permalink / raw)
  To: alsa-devel

Hi,

Ash <hashbrown100 <at> hotmail.com> writes:
> When I am setting up my hw params, and I call snd_pcm_hw_params_any(), I get
an "Operation not permitted"
> error. I am not sure why this is happening, anyone else see this before? I am
using pulseaudio version 0.9.9
> and alsa 1.0.16.

did you figure out what the problem was?
I am having the same problem under Ubuntu, alsa-lib 1.0.17 and pulseaudio 0.9.10.

Thank you in advance,
Ludovico

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-02-11  6:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-26  8:30 Issue with Alsa and PulseAudio Ash
2008-08-26 15:21 ` Colin Guthrie
2008-08-26 15:32   ` Takashi Iwai
2008-08-26 15:39     ` Colin Guthrie
2008-08-26 15:58       ` Takashi Iwai
2008-08-26 15:58       ` Takashi Iwai
2008-08-26 17:08       ` Ash
2008-08-26 22:13         ` Colin Guthrie
2009-02-11  6:49 ` Ludovico Cavedon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.