OpenCloudOS-Kernel/sound
Takashi Iwai e6feb5d085 ALSA: hda - Support advanced power state controls
This patch enables the finer power state control of each widget
depending on the jack plug state and streaming state in addition to
the existing power_down_unused power optimization.  The new feature is
enabled only when codec->power_mgmt flag is set.

Two new flags, pin_enabled and stream_enabled, are introduced in
nid_path struct for marking the two individual power states: the pin
plug/unplug and DAC/ADC stream, respectively.  They can be set
statically in case they are static routes (e.g. some mixer paths),
too.

The power up and down events for each pin are triggered via the
standard hda_jack table.  The call order is hard-coded, relying on the
current implementation of jack event chain (a la FILO/stack order).

One point to be dealt carefully is that DAC/ADC cannot be powered
on/off while streaming.  They are pinned as long as the stream is
running.  For controlling the power of DAC/ADC, a new patch_ops is
added.  The generic parser provides the default callback for that.

As of this patch, only IDT/Sigmatel codec driver enables the flag.
The support on other codecs will follow.

An assumption we made in this code is that the widget state (e.g. amp,
pinctl, connections) remains after the widget power transition (not
about FG power transition).  This is true for IDT codecs, at least.
But if the widget state is lost at widget power transition, we'd need
to implement additional code to sync the cached amp/verbs for the
specific NID.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-18 09:22:28 +01:00
..
aoa Merge branch 'topic/snd-device' into for-next 2015-02-03 17:57:16 +01:00
arm ALSA: Deletion of checks before the function call "iounmap" 2015-01-04 15:13:45 +01:00
atmel ALSA: sound/atmel/ac97c.c: Add device tree support 2015-01-07 07:56:19 +01:00
core Merge branch 'topic/hda-unbind' into for-next 2015-03-16 14:48:20 +01:00
drivers Merge branch 'for-linus' into for-next 2015-03-09 08:42:00 +01:00
firewire Merge branch 'for-linus' into for-next 2015-03-12 07:38:46 +01:00
i2c Merge branch 'topic/ak411x-fix' into for-next 2015-01-28 22:32:10 +01:00
isa Merge branch 'for-linus' into for-next 2015-03-09 08:42:00 +01:00
mips Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
oss sound/sb_midi: a couple indenting fixes 2015-02-25 20:08:27 +01:00
parisc ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
pci ALSA: hda - Support advanced power state controls 2015-03-18 09:22:28 +01:00
pcmcia ALSA: vx: Fix missing kerneldoc parameter descriptions 2014-11-11 09:39:10 +01:00
ppc ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
sh ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
soc Merge branch 'for-linus' into for-next 2015-03-16 14:48:05 +01:00
sparc ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
spi ALSA: spi: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:08 +01:00
synth ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/* 2015-01-28 17:25:07 +01:00
usb Merge branch 'for-linus' into for-next 2015-03-16 14:48:05 +01:00
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c
sound_firmware.c