Re: [pulseaudio-discuss] Changes to deal with modem PCMs

2012-07-29 Thread Mark Brown
On Fri, Jul 27, 2012 at 01:38:30PM -0500, Pierre-Louis Bossart wrote:
> On 7/25/2012 4:19 PM, Mark Brown wrote:
> >If this is for fake streams held open by userspace we have a better in
> >kernel solution now - just hide the PCM from userspace entirely and
> >start it like anything else in the device.  Will that not suffice?

> I don't get it, I must have missed something. What do you mean by
> 'start it like anything else in the device'? Somehow userspace needs
> to enable the connection to the modem in phone use cases, if it's
> not done with a fake PCM then what is the assumption? Use a control
> interface?

PCM stream should just start like any other DAPM route between devices -
when there's an active input and an active output then the path gets
powered.  This may mean some controls if there's conditional routing in
the patch or if we're using PIN_SWITCH() to manage the power for the
input and output nodes but it doesn't have to.
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Changes to deal with modem PCMs

2012-07-27 Thread Pierre-Louis Bossart

On 7/25/2012 4:19 PM, Mark Brown wrote:

If this is for fake streams held open by userspace we have a better in
kernel solution now - just hide the PCM from userspace entirely and
start it like anything else in the device.  Will that not suffice?
I don't get it, I must have missed something. What do you mean by 'start 
it like anything else in the device'? Somehow userspace needs to enable 
the connection to the modem in phone use cases, if it's not done with a 
fake PCM then what is the assumption? Use a control interface?

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Changes to deal with modem PCMs

2012-07-25 Thread Mark Brown
On Mon, Jul 23, 2012 at 03:05:25PM -0500, Pierre-Louis Bossart wrote:

> somehow the information should be available at the ALSA level that
> such devices do not provide/expect any data and should not be
> suspended. This information is available at the kernel level (no_pcm
> flag or something), it should be made available to user-space.

That solution is at the wrong level - presenting the PCM in the first
place is a problem, that was just a hack done ages ago.  Having to hold
this dummy stream open isn't particularly pleasant from a userspace
point of view or integrated from a kernel point of view.
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Changes to deal with modem PCMs

2012-07-25 Thread Mark Brown
On Mon, Jul 23, 2012 at 02:27:26PM +0530, Arun Raghavan wrote:

> While discussion on how we should deal with hardware with different
> requirements from standard desktop cases continues, I'd like to solve the
> problem of having modem PCMs that we don't want to auto-suspend in the near
> future. For this, I've attached a couple of patches that allow a sink or 
> source
> to be flagged as "always running" which would cause suspend to be avoided if
> possible.

> Any objections?

If this is for fake streams held open by userspace we have a better in
kernel solution now - just hide the PCM from userspace entirely and
start it like anything else in the device.  Will that not suffice?
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Changes to deal with modem PCMs

2012-07-24 Thread Arun Raghavan
On Mon, 2012-07-23 at 15:05 -0500, Pierre-Louis Bossart wrote:
> On 7/23/2012 3:57 AM, Arun Raghavan wrote:
> > Hello,
> > While discussion on how we should deal with hardware with different
> > requirements from standard desktop cases continues, I'd like to solve the
> > problem of having modem PCMs that we don't want to auto-suspend in the near
> > future. For this, I've attached a couple of patches that allow a sink or 
> > source
> > to be flagged as "always running" which would cause suspend to be avoided if
> > possible.
> >
> > Any objections?
> Yes. These devices are used to open connections to modems without 
> receiving any data from userspace.
> I don't think PulseAudio should flag specific sinks this way, somehow 
> the information should be available at the ALSA level that such devices 
> do not provide/expect any data and should not be suspended. This 
> information is available at the kernel level (no_pcm flag or something), 
> it should be made available to user-space.

In the patches I sent, the actually setting of the flag is not present.
I've got it included in my policy module, but it could easily be
signaled by the kernel as you suggest, or in UCM config.

Ideally, I'd use Tanu's suggestion to not expose the phone PCMs as sinks
at all, and just have them opened/closed in the alsa module (he suggests
an API to do this (pa_alsa_card_open_cellular_...), but I think we could
potentially just tie it to the "Voice Call" UCM verb). However, my fear
is that this is too specific to the OMAP4, which is why I went down this
route.

-- Arun

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Changes to deal with modem PCMs

2012-07-23 Thread Pierre-Louis Bossart

On 7/23/2012 3:57 AM, Arun Raghavan wrote:

Hello,
While discussion on how we should deal with hardware with different
requirements from standard desktop cases continues, I'd like to solve the
problem of having modem PCMs that we don't want to auto-suspend in the near
future. For this, I've attached a couple of patches that allow a sink or source
to be flagged as "always running" which would cause suspend to be avoided if
possible.

Any objections?
Yes. These devices are used to open connections to modems without 
receiving any data from userspace.
I don't think PulseAudio should flag specific sinks this way, somehow 
the information should be available at the ALSA level that such devices 
do not provide/expect any data and should not be suspended. This 
information is available at the kernel level (no_pcm flag or something), 
it should be made available to user-space.

-Pierre
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss