[alsa-devel] [RFC PATCH] ALSA: hda - add support for runtime power management

Lin, Mengdong mengdong.lin at intel.com
Fri Aug 17 16:41:17 CEST 2012


> ... Basically the patch below should do almost
> equivalently.  It doesn't free/reacquire irq, which I'm not quite sure whether
> mandatory for power-saving.
> 
> @@ -2402,11 +2402,14 @@ static void azx_power_notify(struct hda_bus
> *bus)
>  			break;
>  		}
>  	}
> -	if (power_on)
> +	if (power_on) {
> +		pci_set_power_state(chip->pci, PCI_D0);
>  		azx_init_chip(chip, 1);
> -	else if (chip->running && power_save_controller &&
> -		 !bus->power_keep_link_on)
> +	} else if (chip->running && power_save_controller &&
> +		   !bus->power_keep_link_on) {
>  		azx_stop_chip(chip);
> +		pci_set_power_state(chip->pci, PCI_D3hot);
> +	}
>  }
>  #endif /* CONFIG_SND_HDA_POWER_SAVE */
> 

Hi Takashi,

Thanks for your comments. 

I think that adding runtime PM support can bring some benefits:
(1) Make the HD-A devices become part of system runtime PM and can bring more power saving. When the HD-A controller is suspended via runtime PM API, the runtime PM subsystem will also try to suspend the parent device. 
(2) PCI subsystem has implemented a framework for runtime PM, supporting both PCI PM and ACPI PM. When the HD-A controller is to be suspended, it can choose the lowest power state the device can signal wake up from. This state can be D3cold if the platform can support via ACPI. This also means more power saving.
(3) Provide a general sysfs interface to upper level policy manager.

Thanks
Mengdong



More information about the Alsa-devel mailing list