linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the sound tree with the drm tree
@ 2013-08-30  3:03 Stephen Rothwell
  2013-08-30  6:16 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2013-08-30  3:03 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-next, linux-kernel, Dave Airlie, Wang Xingchao

[-- Attachment #1: Type: text/plain, Size: 2132 bytes --]

Hi Takashi,

Today's linux-next merge of the sound tree got a conflict in
sound/pci/hda/hda_intel.c between commit 246efa4a072f ("snd/hda: add
runtime suspend/resume on optimus support (v4)") from the drm tree and
commit 7d4f606c50ff ("ALSA: hda - WAKEEN feature enabling for runtime
pm") from the sound tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc sound/pci/hda/hda_intel.c
index bf5e58e,c6c9829..0000000
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@@ -2975,12 -2971,10 +2975,16 @@@ static int azx_runtime_suspend(struct d
  	struct snd_card *card = dev_get_drvdata(dev);
  	struct azx *chip = card->private_data;
  
 +	if (chip->disabled)
 +		return 0;
 +
 +	if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
 +		return 0;
 +
+ 	/* enable controller wake up event */
+ 	azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) |
+ 		  STATESTS_INT_MASK);
+ 
  	azx_stop_chip(chip);
  	azx_enter_link_reset(chip);
  	azx_clear_irq_pending(chip);
@@@ -2993,17 -2987,31 +2997,37 @@@ static int azx_runtime_resume(struct de
  {
  	struct snd_card *card = dev_get_drvdata(dev);
  	struct azx *chip = card->private_data;
+ 	struct hda_bus *bus;
+ 	struct hda_codec *codec;
+ 	int status;
  
 +	if (chip->disabled)
 +		return 0;
 +
 +	if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
 +		return 0;
 +
  	if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL)
  		hda_display_power(true);
+ 
+ 	/* Read STATESTS before controller reset */
+ 	status = azx_readw(chip, STATESTS);
+ 
  	azx_init_pci(chip);
  	azx_init_chip(chip, 1);
+ 
+ 	bus = chip->bus;
+ 	if (status && bus) {
+ 		list_for_each_entry(codec, &bus->codec_list, list)
+ 			if (status & (1 << codec->addr))
+ 				queue_delayed_work(codec->bus->workq,
+ 						   &codec->jackpoll_work, codec->jackpoll_interval);
+ 	}
+ 
+ 	/* disable controller Wake Up event*/
+ 	azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
+ 			~STATESTS_INT_MASK);
+ 
  	return 0;
  }
  

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: manual merge of the sound tree with the drm tree
  2013-08-30  3:03 linux-next: manual merge of the sound tree with the drm tree Stephen Rothwell
@ 2013-08-30  6:16 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2013-08-30  6:16 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Dave Airlie, Wang Xingchao

At Fri, 30 Aug 2013 13:03:55 +1000,
Stephen Rothwell wrote:
> 
> Hi Takashi,
> 
> Today's linux-next merge of the sound tree got a conflict in
> sound/pci/hda/hda_intel.c between commit 246efa4a072f ("snd/hda: add
> runtime suspend/resume on optimus support (v4)") from the drm tree and
> commit 7d4f606c50ff ("ALSA: hda - WAKEEN feature enabling for runtime
> pm") from the sound tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

Thanks!  The conflict fix looks correct.


Takashi

> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --cc sound/pci/hda/hda_intel.c
> index bf5e58e,c6c9829..0000000
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@@ -2975,12 -2971,10 +2975,16 @@@ static int azx_runtime_suspend(struct d
>   	struct snd_card *card = dev_get_drvdata(dev);
>   	struct azx *chip = card->private_data;
>   
>  +	if (chip->disabled)
>  +		return 0;
>  +
>  +	if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
>  +		return 0;
>  +
> + 	/* enable controller wake up event */
> + 	azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) |
> + 		  STATESTS_INT_MASK);
> + 
>   	azx_stop_chip(chip);
>   	azx_enter_link_reset(chip);
>   	azx_clear_irq_pending(chip);
> @@@ -2993,17 -2987,31 +2997,37 @@@ static int azx_runtime_resume(struct de
>   {
>   	struct snd_card *card = dev_get_drvdata(dev);
>   	struct azx *chip = card->private_data;
> + 	struct hda_bus *bus;
> + 	struct hda_codec *codec;
> + 	int status;
>   
>  +	if (chip->disabled)
>  +		return 0;
>  +
>  +	if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
>  +		return 0;
>  +
>   	if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL)
>   		hda_display_power(true);
> + 
> + 	/* Read STATESTS before controller reset */
> + 	status = azx_readw(chip, STATESTS);
> + 
>   	azx_init_pci(chip);
>   	azx_init_chip(chip, 1);
> + 
> + 	bus = chip->bus;
> + 	if (status && bus) {
> + 		list_for_each_entry(codec, &bus->codec_list, list)
> + 			if (status & (1 << codec->addr))
> + 				queue_delayed_work(codec->bus->workq,
> + 						   &codec->jackpoll_work, codec->jackpoll_interval);
> + 	}
> + 
> + 	/* disable controller Wake Up event*/
> + 	azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
> + 			~STATESTS_INT_MASK);
> + 
>   	return 0;
>   }
>   

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

end of thread, other threads:[~2013-08-30  6:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30  3:03 linux-next: manual merge of the sound tree with the drm tree Stephen Rothwell
2013-08-30  6:16 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).