* why snd_soc_suspend is not called
@ 2012-06-19 5:12 zhangfei gao
2012-06-19 5:27 ` zhangfei gao
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: zhangfei gao @ 2012-06-19 5:12 UTC (permalink / raw)
To: alsa-devel; +Cc: alsa-devel
Hi, Mark
Excuse me, I am confused about snd_soc_suspend.
When realizing cpu_dai->driver->suspend, we found snd_soc_suspend is not called.
In fact, even soc_probe is not called since no soc-audio device.
We manually alloc soc-audio deivce before in platfrom.c.
dev = platform_device_alloc("soc-audio", -1);
platform_set_drvdata(device, &snd_soc_card);
platform_device_add(dev);
When running, system recommend using snd_soc_register_card instead.
After doing such modification, the audio could work.
But strangely snd_soc_suspend is not called, as well as soc-probe.
So cpu_dai->driver->suspend will no be called accordingly.
If manually add "soc-audio" in arch/, the soc-probe can be called.
But snd_soc_suspend still fail to be called.
Could you give me some suggestion?
Thanks a lot.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why snd_soc_suspend is not called
2012-06-19 5:12 why snd_soc_suspend is not called zhangfei gao
@ 2012-06-19 5:27 ` zhangfei gao
2012-06-19 5:45 ` zhangfei gao
2012-06-19 9:30 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: zhangfei gao @ 2012-06-19 5:27 UTC (permalink / raw)
To: alsa-devel
On Tue, Jun 19, 2012 at 1:12 PM, zhangfei gao <zhangfei.gao@gmail.com> wrote:
> Hi, Mark
>
> Excuse me, I am confused about snd_soc_suspend.
>
> When realizing cpu_dai->driver->suspend, we found snd_soc_suspend is not called.
> In fact, even soc_probe is not called since no soc-audio device.
>
> We manually alloc soc-audio deivce before in platfrom.c.
> dev = platform_device_alloc("soc-audio", -1);
> platform_set_drvdata(device, &snd_soc_card);
> platform_device_add(dev);
>
> When running, system recommend using snd_soc_register_card instead.
> After doing such modification, the audio could work.
> But strangely snd_soc_suspend is not called, as well as soc-probe.
> So cpu_dai->driver->suspend will no be called accordingly.
>
> If manually add "soc-audio" in arch/, the soc-probe can be called.
> But snd_soc_suspend still fail to be called.
>
> Could you give me some suggestion?
>
> Thanks a lot.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why snd_soc_suspend is not called
2012-06-19 5:12 why snd_soc_suspend is not called zhangfei gao
2012-06-19 5:27 ` zhangfei gao
@ 2012-06-19 5:45 ` zhangfei gao
2012-06-19 9:30 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: zhangfei gao @ 2012-06-19 5:45 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Haojian Zhuang
On Tue, Jun 19, 2012 at 1:12 PM, zhangfei gao <zhangfei.gao@gmail.com> wrote:
> Hi, Mark
>
> Excuse me, I am confused about snd_soc_suspend.
>
> When realizing cpu_dai->driver->suspend, we found snd_soc_suspend is not called.
> In fact, even soc_probe is not called since no soc-audio device.
>
> We manually alloc soc-audio deivce before in platfrom.c.
> dev = platform_device_alloc("soc-audio", -1);
> platform_set_drvdata(device, &snd_soc_card);
> platform_device_add(dev);
>
By the way, If move back to the old method, suspend works normal.
snd_soc_suspend -> cpu_dai->driver->suspend are called.
However, kernel prints
[ 1.212731] soc-audio soc-audio: ASoC machine brownstone should use
snd_soc_register_card()
Which one is right direction?
> When running, system recommend using snd_soc_register_card instead.
> After doing such modification, the audio could work.
> But strangely snd_soc_suspend is not called, as well as soc-probe.
> So cpu_dai->driver->suspend will no be called accordingly.
>
> If manually add "soc-audio" in arch/, the soc-probe can be called.
> But snd_soc_suspend still fail to be called.
>
> Could you give me some suggestion?
>
> Thanks a lot.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why snd_soc_suspend is not called
2012-06-19 5:12 why snd_soc_suspend is not called zhangfei gao
2012-06-19 5:27 ` zhangfei gao
2012-06-19 5:45 ` zhangfei gao
@ 2012-06-19 9:30 ` Mark Brown
2012-06-21 2:47 ` zhangfei gao
2 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2012-06-19 9:30 UTC (permalink / raw)
To: alsa-devel; +Cc: alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 718 bytes --]
On Tue, Jun 19, 2012 at 01:12:05PM +0800, zhangfei gao wrote:
> In fact, even soc_probe is not called since no soc-audio device.
This is only called for soc-audio, if it were called otherwise it would
be abug.
> When running, system recommend using snd_soc_register_card instead.
> After doing such modification, the audio could work.
> But strangely snd_soc_suspend is not called, as well as soc-probe.
> So cpu_dai->driver->suspend will no be called accordingly.
> If manually add "soc-audio" in arch/, the soc-probe can be called.
> But snd_soc_suspend still fail to be called.
> Could you give me some suggestion?
There is probably a bug in your code. At a guess you've not set up the
pm ops for your card.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why snd_soc_suspend is not called
2012-06-19 9:30 ` Mark Brown
@ 2012-06-21 2:47 ` zhangfei gao
2012-06-21 9:12 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: zhangfei gao @ 2012-06-21 2:47 UTC (permalink / raw)
To: alsa-devel; +Cc: Qiao Zhou, alsa-devel, Leo Yan
On Tue, Jun 19, 2012 at 5:30 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Jun 19, 2012 at 01:12:05PM +0800, zhangfei gao wrote:
>
>> In fact, even soc_probe is not called since no soc-audio device.
>
> This is only called for soc-audio, if it were called otherwise it would
> be abug.
>
>> When running, system recommend using snd_soc_register_card instead.
>> After doing such modification, the audio could work.
>> But strangely snd_soc_suspend is not called, as well as soc-probe.
>> So cpu_dai->driver->suspend will no be called accordingly.
>
>> If manually add "soc-audio" in arch/, the soc-probe can be called.
>> But snd_soc_suspend still fail to be called.
>
>> Could you give me some suggestion?
>
> There is probably a bug in your code. At a guess you've not set up the
> pm ops for your card.
Thanks Mark.
Using snd_soc_register_card, pm ops of cpu driver has to be provided
instead of dai driver as before.
However, SNDRV_PCM_TRIGGER_SUSPEND/RESUME can not be called.
SNDRV_PCM_TRIGGER_START/SNDRV_PCM_TRIGGER_STOP will be called in suspend/resume.
Is it right?
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: why snd_soc_suspend is not called
2012-06-21 2:47 ` zhangfei gao
@ 2012-06-21 9:12 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2012-06-21 9:12 UTC (permalink / raw)
To: alsa-devel; +Cc: Qiao Zhou, alsa-devel, Leo Yan
[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]
On Thu, Jun 21, 2012 at 10:47:12AM +0800, zhangfei gao wrote:
> Thanks Mark.
> Using snd_soc_register_card, pm ops of cpu driver has to be provided
> instead of dai driver as before.
> However, SNDRV_PCM_TRIGGER_SUSPEND/RESUME can not be called.
> SNDRV_PCM_TRIGGER_START/SNDRV_PCM_TRIGGER_STOP will be called in suspend/resume.
> Is it right?
No. The ASoC suspend and resume process should be exactly the same for
both cases.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-06-21 9:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-19 5:12 why snd_soc_suspend is not called zhangfei gao
2012-06-19 5:27 ` zhangfei gao
2012-06-19 5:45 ` zhangfei gao
2012-06-19 9:30 ` Mark Brown
2012-06-21 2:47 ` zhangfei gao
2012-06-21 9:12 ` Mark Brown
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.