All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: fix a compiling issue
@ 2015-04-13  2:47 Jie Yang
  2015-04-13  4:50 ` Michael Trimarchi
  2015-04-18 12:11 ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Jie Yang @ 2015-04-13  2:47 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, liam.r.girdwood

Fix the compiling issue that we don't have snd_soc_suspend/resume()
when CONFIG_PM_SLEEP is not defined.

Signed-off-by: Jie Yang <yang.jie@intel.com>
---
 sound/soc/intel/haswell/sst-haswell-pcm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c
index 23ae040..f84eb14 100644
--- a/sound/soc/intel/haswell/sst-haswell-pcm.c
+++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
@@ -1313,8 +1313,9 @@ static void hsw_pcm_complete(struct device *dev)
 			dev_err(dev, "failed to restore context for PCM %d\n", i);
 	}
 
+#ifdef CONFIG_PM_SLEEP
 	snd_soc_resume(pdata->soc_card->dev);
-
+#endif
 	err = sst_hsw_dsp_runtime_resume(hsw);
 	if (err < 0)
 		return;
@@ -1367,7 +1368,9 @@ static int hsw_pcm_prepare(struct device *dev)
 		sst_hsw_dsp_runtime_sleep(hsw);
 	}
 
+#ifdef CONFIG_PM_SLEEP
 	snd_soc_suspend(pdata->soc_card->dev);
+#endif
 	snd_soc_poweroff(pdata->soc_card->dev);
 
 	pdata->pm_state = HSW_PM_STATE_D3;
-- 
1.9.1

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

* Re: [PATCH] ASoC: Intel: fix a compiling issue
  2015-04-13  2:47 [PATCH] ASoC: Intel: fix a compiling issue Jie Yang
@ 2015-04-13  4:50 ` Michael Trimarchi
  2015-04-16  8:17   ` Keyon
  2015-04-18 12:11 ` Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2015-04-13  4:50 UTC (permalink / raw)
  To: Jie Yang; +Cc: alsa-devel, broonie, liam.r.girdwood

Hi

On Apr 13, 2015 4:44 AM, "Jie Yang" <yang.jie@intel.com> wrote:
>
> Fix the compiling issue that we don't have snd_soc_suspend/resume()
> when CONFIG_PM_SLEEP is not defined.
>
> Signed-off-by: Jie Yang <yang.jie@intel.com>
> ---
>  sound/soc/intel/haswell/sst-haswell-pcm.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c
b/sound/soc/intel/haswell/sst-haswell-pcm.c
> index 23ae040..f84eb14 100644
> --- a/sound/soc/intel/haswell/sst-haswell-pcm.c
> +++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
> @@ -1313,8 +1313,9 @@ static void hsw_pcm_complete(struct device *dev)
>                         dev_err(dev, "failed to restore context for PCM
%d\n", i);
>         }
>
> +#ifdef CONFIG_PM_SLEEP
>         snd_soc_resume(pdata->soc_card->dev);
> -
> +#endif

I think it's better to include an empy version for this configuration

Michael

>         err = sst_hsw_dsp_runtime_resume(hsw);
>         if (err < 0)
>                 return;
> @@ -1367,7 +1368,9 @@ static int hsw_pcm_prepare(struct device *dev)
>                 sst_hsw_dsp_runtime_sleep(hsw);
>         }
>
> +#ifdef CONFIG_PM_SLEEP
>         snd_soc_suspend(pdata->soc_card->dev);
> +#endif
>         snd_soc_poweroff(pdata->soc_card->dev);
>
>         pdata->pm_state = HSW_PM_STATE_D3;
> --
> 1.9.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH] ASoC: Intel: fix a compiling issue
  2015-04-13  4:50 ` Michael Trimarchi
@ 2015-04-16  8:17   ` Keyon
  0 siblings, 0 replies; 7+ messages in thread
From: Keyon @ 2015-04-16  8:17 UTC (permalink / raw)
  To: Michael Trimarchi, Jie Yang; +Cc: alsa-devel, broonie, liam.r.girdwood

On 2015年04月13日 12:50, Michael Trimarchi wrote:
> Hi
>
> On Apr 13, 2015 4:44 AM, "Jie Yang" <yang.jie@intel.com> wrote:
>> Fix the compiling issue that we don't have snd_soc_suspend/resume()
>> when CONFIG_PM_SLEEP is not defined.
>>
>> Signed-off-by: Jie Yang <yang.jie@intel.com>
>> ---
>>   sound/soc/intel/haswell/sst-haswell-pcm.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c
> b/sound/soc/intel/haswell/sst-haswell-pcm.c
>> index 23ae040..f84eb14 100644
>> --- a/sound/soc/intel/haswell/sst-haswell-pcm.c
>> +++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
>> @@ -1313,8 +1313,9 @@ static void hsw_pcm_complete(struct device *dev)
>>                          dev_err(dev, "failed to restore context for PCM
> %d\n", i);
>>          }
>>
>> +#ifdef CONFIG_PM_SLEEP
>>          snd_soc_resume(pdata->soc_card->dev);
>> -
>> +#endif
> I think it's better to include an empy version for this configuration
>
> Michael

do you mean that adding line such like:

#define snd_soc_resume    NULL

we have that in soc-core.c,  but only the non-null version is exported.

~Keyon

>
>>          err = sst_hsw_dsp_runtime_resume(hsw);
>>          if (err < 0)
>>                  return;
>> @@ -1367,7 +1368,9 @@ static int hsw_pcm_prepare(struct device *dev)
>>                  sst_hsw_dsp_runtime_sleep(hsw);
>>          }
>>
>> +#ifdef CONFIG_PM_SLEEP
>>          snd_soc_suspend(pdata->soc_card->dev);
>> +#endif
>>          snd_soc_poweroff(pdata->soc_card->dev);
>>
>>          pdata->pm_state = HSW_PM_STATE_D3;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> 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
>

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH] ASoC: Intel: fix a compiling issue
  2015-04-13  2:47 [PATCH] ASoC: Intel: fix a compiling issue Jie Yang
  2015-04-13  4:50 ` Michael Trimarchi
@ 2015-04-18 12:11 ` Mark Brown
  2015-04-18 12:19   ` Michael Trimarchi
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2015-04-18 12:11 UTC (permalink / raw)
  To: Jie Yang; +Cc: alsa-devel, liam.r.girdwood


[-- Attachment #1.1: Type: text/plain, Size: 446 bytes --]

On Mon, Apr 13, 2015 at 10:47:30AM +0800, Jie Yang wrote:
> Fix the compiling issue that we don't have snd_soc_suspend/resume()
> when CONFIG_PM_SLEEP is not defined.

> +#ifdef CONFIG_PM_SLEEP
>  	snd_soc_resume(pdata->soc_card->dev);
> -
> +#endif

Rather than have the ifdefs in the users it seems like it'd be better to
fix this by providing static inline stub functions in the headers.  That
way nothing else will run into the same trouble.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: Intel: fix a compiling issue
  2015-04-18 12:11 ` Mark Brown
@ 2015-04-18 12:19   ` Michael Trimarchi
  2015-04-18 17:03     ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2015-04-18 12:19 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, liam.r.girdwood

Hi

On Apr 18, 2015 8:11 PM, "Mark Brown" <broonie@kernel.org> wrote:
>
> On Mon, Apr 13, 2015 at 10:47:30AM +0800, Jie Yang wrote:
> > Fix the compiling issue that we don't have snd_soc_suspend/resume()
> > when CONFIG_PM_SLEEP is not defined.
>
> > +#ifdef CONFIG_PM_SLEEP
> >       snd_soc_resume(pdata->soc_card->dev);
> > -
> > +#endif
>
> Rather than have the ifdefs in the users it seems like it'd be better to
> fix this by providing static inline stub functions in the headers.  That
> way nothing else will run into the same trouble.
>

This was my "English" suggestion

Thanks

Michael

> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

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

* Re: [PATCH] ASoC: Intel: fix a compiling issue
  2015-04-18 12:19   ` Michael Trimarchi
@ 2015-04-18 17:03     ` Mark Brown
  2015-04-19  1:39       ` Jie, Yang
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2015-04-18 17:03 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: alsa-devel, liam.r.girdwood


[-- Attachment #1.1: Type: text/plain, Size: 434 bytes --]

On Sat, Apr 18, 2015 at 02:19:37PM +0200, Michael Trimarchi wrote:
> On Apr 18, 2015 8:11 PM, "Mark Brown" <broonie@kernel.org> wrote:

> > Rather than have the ifdefs in the users it seems like it'd be better to
> > fix this by providing static inline stub functions in the headers.  That
> > way nothing else will run into the same trouble.

> This was my "English" suggestion

Yeah, I hadn't seen your mail when I wrote the above.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: Intel: fix a compiling issue
  2015-04-18 17:03     ` Mark Brown
@ 2015-04-19  1:39       ` Jie, Yang
  0 siblings, 0 replies; 7+ messages in thread
From: Jie, Yang @ 2015-04-19  1:39 UTC (permalink / raw)
  To: Mark Brown, Michael Trimarchi; +Cc: alsa-devel, Girdwood, Liam R

> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Sunday, April 19, 2015 1:03 AM
> To: Michael Trimarchi
> Cc: alsa-devel@alsa-project.org; Jie, Yang; Girdwood, Liam R
> Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: fix a compiling issue
> 
> On Sat, Apr 18, 2015 at 02:19:37PM +0200, Michael Trimarchi wrote:
> > On Apr 18, 2015 8:11 PM, "Mark Brown" <broonie@kernel.org> wrote:
> 
> > > Rather than have the ifdefs in the users it seems like it'd be
> > > better to fix this by providing static inline stub functions in the
> > > headers.  That way nothing else will run into the same trouble.
> 
> > This was my "English" suggestion
> 
> Yeah, I hadn't seen your mail when I wrote the above.
 
Thank you, Mark and Michael. Will follow it and send another patch
soon.

~Keyon

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

end of thread, other threads:[~2015-04-19  1:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13  2:47 [PATCH] ASoC: Intel: fix a compiling issue Jie Yang
2015-04-13  4:50 ` Michael Trimarchi
2015-04-16  8:17   ` Keyon
2015-04-18 12:11 ` Mark Brown
2015-04-18 12:19   ` Michael Trimarchi
2015-04-18 17:03     ` Mark Brown
2015-04-19  1:39       ` Jie, Yang

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.