[alsa-devel] amp power down event (resend with the correct email)
Hi all,
I'm t rying to unde rstand when the event a re called.
... SND_SOC_DAPM_SPK("Front Speaker", amp_event), ...
My idea was:
- set the mixe r - open st ream
amp_event: event => [ 169.820558] ON
- close st ream
and receive the event => OFF. In the aplay example this happen afte r some seconds but in my application I don't receive the OFF event. What is w rong?
Michael
Hi all
Michael Trimarchi wrote:
Hi all,
I'm t rying to unde rstand when the event a re called.
... SND_SOC_DAPM_SPK("Front Speaker", amp_event),
I have fixed looking in the kernel code. Change this to:
SND_SOC_DAPM_PRE("Front Speaker", amp_event),
Is it correct?
Michael
...
My idea was:
- set the mixe r
- open st ream
amp_event: event => [ 169.820558] ON
- close st ream
and receive the event => OFF. In the aplay example this happen afte r some seconds but in my application I don't receive the OFF event. What is w rong?
Michael
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Michael Trimarchi wrote:
Hi all
Michael Trimarchi wrote:
Hi all,
I'm t rying to unde rstand when the event a re called.
... SND_SOC_DAPM_SPK("Front Speaker", amp_event),
I have fixed looking in the kernel code. Change this to:
SND_SOC_DAPM_PRE("Front Speaker", amp_event),
Is it correct?
So now:
[ 400.894580] widget Right Voice ADC [ 400.894592] Right Voice Capture stream HiFi Playback event 2 [ 400.903667] widget Left Voice ADC [ 400.903673] Left Voice Capture stream HiFi Playback event 2 [ 400.912593] widget Right HiFi ADC [ 400.912599] Right HiFi Capture stream HiFi Playback event 2 [ 400.921514] widget Left HiFi ADC [ 400.921520] Left HiFi Capture stream HiFi Playback event 2 [ 400.930282] widget Aux DAC [ 400.930288] Aux Playback stream HiFi Playback event 2 [ 400.938081] widget Voice DAC [ 400.938087] Voice Playback stream HiFi Playback event 2 [ 400.946232] widget Right DAC [ 400.946237] Right HiFi Playback stream HiFi Playback event 2 [ 400.954813] widget Left DAC [ 400.954819] Left HiFi Playback stream HiFi Playback event 2 [ 400.963617] amp_event: event => [ 400.966604] OFF
when the stream is closed.
Michael
Michael
...
My idea was:
- set the mixe r
- open st ream
amp_event: event => [ 169.820558] ON
- close st ream
and receive the event => OFF. In the aplay example this happen afte r some seconds but in my application I don't receive the OFF event. What is w rong?
Michael
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
On Mon, Aug 09, 2010 at 08:05:53PM +0200, Michael Trimarchi wrote:
I'm t rying to unde rstand when the event a re called.
As I believe I have reminded you on a number of occasions you should always CC the maintainers on Linux kernel queries.
and receive the event => OFF. In the aplay example this happen afte r some seconds but in my application I don't receive the OFF event. What is w rong?
Your application will have left audio going to the speaker. This will either be a running playback or an analogue path.
Hi,
Mark Brown wrote:
On Mon, Aug 09, 2010 at 08:05:53PM +0200, Michael Trimarchi wrote:
I'm t rying to unde rstand when the event a re called.
As I believe I have reminded you on a number of occasions you should always CC the maintainers on Linux kernel queries.
and receive the event => OFF. In the aplay example this happen afte r some seconds but in my application I don't receive the OFF event. What is w rong?
Your application will have left audio going to the speaker. This will either be a running playback or an analogue path.
I have fixed change to SND_SOC_DAPM_PRE("Front Speaker", amp_event),
so when the stream is closed the amp is deactivated using the event 2
[ 400.946232] widget Right DAC [ 400.946237] Right HiFi Playback stream HiFi Playback event 2 [ 400.954813] widget Left DAC [ 400.954819] Left HiFi Playback stream HiFi Playback event 2 [ 400.963617] amp_event: event => [ 400.966604] OFF
This is ok if the user implements the standby closing the out channel.
Michael Trimarchi
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
On Tue, Aug 10, 2010 at 12:56:51PM +0200, Michael Trimarchi wrote:
Mark Brown wrote:
I have fixed change to SND_SOC_DAPM_PRE("Front Speaker", amp_event),
This is not a good fix, you've totally misunderstood what that widget does and it won't be sequenced in the expected fashion. You should use a speaker widget for a speaker.
Mark Brown wrote:
On Tue, Aug 10, 2010 at 12:56:51PM +0200, Michael Trimarchi wrote:
Mark Brown wrote:
I have fixed change to SND_SOC_DAPM_PRE("Front Speaker", amp_event),
This is not a good fix, you've totally misunderstood what that widget does and it won't be sequenced in the expected fashion. You should use a speaker widget for a speaker.
Ok, I will fix
When the amp_event is supposed to be called in the speaker widget? After the stream is closed?
Michael
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
On Tue, Aug 10, 2010 at 02:09:27PM +0200, Michael Trimarchi wrote:
When the amp_event is supposed to be called in the speaker widget? After the stream is closed?
It will be called when the speaker is powered down. For DAC to speaker paths this will be five seconds after playback stops in the default configuration.
Hi,
it is a good practice to CC the maintainers to get the attention (in this case Liam and Mark)..
On Monday 09 August 2010 21:05:53 ext Michael Trimarchi wrote:
Hi all,
I'm t rying to unde rstand when the event a re called.
... SND_SOC_DAPM_SPK("Front Speaker", amp_event), ...
This is turned on or off by the DAPM power sequences. Take a look at the sound/soc/soc-dapm.c, and at the beginning of the file, you can see the on and off sequences. Generally: The DAPM_SPK widget will be powered on last, and powered down first, or early to avoid the pop coming from other widget powering.
My idea was:
- set the mixe r
- open st ream
amp_event: event => [ 169.820558] ON
- close st ream
and receive the event => OFF. In the aplay example this happen afte r some seconds but in my application I don't receive the OFF event. What is w rong?
What do you mean? User space will not receive such an event, this is ASoC internal (specifically DAPM doing it's thing). The some seconds you see is most likely 5 seconds, which is the soc delay for going lower power state after the stream has been stopped, or the loopback is closed.
Michael
participants (3)
-
Mark Brown
-
Michael Trimarchi
-
Peter Ujfalusi