All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] sound fixes for 3.7-rc7
Date: Sat, 24 Nov 2012 12:04:26 +0100	[thread overview]
Message-ID: <s5hpq33b6th.wl%tiwai@suse.de> (raw)
In-Reply-To: <20121124094610.GA221@x4>

At Sat, 24 Nov 2012 10:46:10 +0100,
Markus Trippelsdorf wrote:
> 
> On 2012.11.23 at 14:23 +0100, Takashi Iwai wrote:
> > Sound fixes for 3.7-rc7
> > 
> > The highlight of this update is the fixes for ASoC kirkwood by Russell.
> > In addition to that, a couple of regression fixes for HD-audio due to
> > the runtime PM support on 3.7, and other driver-specific regression
> > fixes like USB MIDI on non-standard USB audio drivers.
> > 
> > Takashi Iwai (2):
> >       ALSA: hda - Fix recursive suspend/resume call
> 
> This commit causes with !CONFIG_PM:
> 
> ound/pci/hda/hda_codec.c: In function ‘codec_exec_verb’:
> sound/pci/hda/hda_codec.c:231:12: error: ‘struct hda_codec’ has no member named ‘in_pm’
>   if (!codec->in_pm && res && *res == -1 && bus->rirb_error) {
>             ^
> sound/pci/hda/hda_codec.c:241:19: error: ‘struct hda_codec’ has no member named ‘in_pm’
>   if (!err || codec->in_pm)
>                    ^
> make[3]: *** [sound/pci/hda/hda_codec.o] Error 1

Oops sorry.  I fixed now with the patch below.
I'm going to send another pull request for this fix.


thanks,

Takashi

---
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: hda - Fix build without CONFIG_PM

I forgot this again...  codec->in_pm is in #ifdef CONFIG_PM

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_codec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index cebe2dfd..d010de1 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -95,6 +95,7 @@ int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset)
 EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset);
 
 #ifdef CONFIG_PM
+#define codec_in_pm(codec)	((codec)->in_pm)
 static void hda_power_work(struct work_struct *work);
 static void hda_keep_power_on(struct hda_codec *codec);
 #define hda_codec_is_power_on(codec)	((codec)->power_on)
@@ -104,6 +105,7 @@ static inline void hda_call_pm_notify(struct hda_bus *bus, bool power_up)
 		bus->ops.pm_notify(bus, power_up);
 }
 #else
+#define codec_in_pm(codec)	0
 static inline void hda_keep_power_on(struct hda_codec *codec) {}
 #define hda_codec_is_power_on(codec)	1
 #define hda_call_pm_notify(bus, state) {}
@@ -228,7 +230,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
 	}
 	mutex_unlock(&bus->cmd_mutex);
 	snd_hda_power_down(codec);
-	if (!codec->in_pm && res && *res == -1 && bus->rirb_error) {
+	if (!codec_in_pm(codec) && res && *res == -1 && bus->rirb_error) {
 		if (bus->response_reset) {
 			snd_printd("hda_codec: resetting BUS due to "
 				   "fatal communication error\n");
@@ -238,7 +240,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
 		goto again;
 	}
 	/* clear reset-flag when the communication gets recovered */
-	if (!err || codec->in_pm)
+	if (!err || codec_in_pm(codec))
 		bus->response_reset = 0;
 	return err;
 }
-- 
1.8.0


      reply	other threads:[~2012-11-24 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23 13:23 [GIT PULL] sound fixes for 3.7-rc7 Takashi Iwai
2012-11-24  9:46 ` Markus Trippelsdorf
2012-11-24 11:04   ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hpq33b6th.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=markus@trippelsdorf.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.