linux/sound
Wu Fengguang ef18beded8 ALSA: hda - HDMI sticky stream tag support
When we run the following commands in turn (with
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0),

	speaker-test -Dhw:0,3 -c2 -twav  # HDMI
	speaker-test -Dhw:0,0 -c2 -twav  # Analog

The second command will produce sound in the analog lineout _as well as_
HDMI sink. The root cause is, device 0 "reuses" the same stream tag that
was used by device 3, and the "intelhdmi - sticky stream id" patch leaves
the HDMI codec in a functional state. So the HDMI codec happily accepts
the audio samples which reuse its stream tag.

The proposed solution is to remember the last device each azx_dev was
assigned to, and prefer to
1) reuse the azx_dev (and hence the stream tag) the HDMI codec last used
2) or assign a never-used azx_dev for HDMI

With this patch and the above two speaker-test commands,
HDMI codec will use stream tag 8 and Analog codec will use 5.

The stream tag used by HDMI codec won't be reused by others, as long
as we don't run out of the 4 playback azx_dev's. The legacy Analog
codec will continue to use stream tag 5 because its device id is 0
(this is a bit tricky).

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 14:17:36 +01:00
..
aoa ALSA: Don't assume i2c device probing always succeeds 2009-10-01 07:46:33 +02:00
arm ALSA: AACI: switch to per-pcm locking 2009-12-18 20:31:13 +01:00
atmel
core ALSA: sound/core/pcm_timer.c: use lib/gcd.c 2009-12-22 08:24:35 +01:00
drivers Merge branch 'topic/beep-rename' into topic/core-change 2009-12-01 15:58:10 +01:00
i2c Merge branch 'topic/hda' into for-linus 2009-12-04 16:22:45 +01:00
isa ALSA: sbawe: fix memory detection 2009-12-21 12:03:11 +01:00
mips sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer 2009-12-18 12:53:17 +01:00
oss sound/oss/pss: Fix test of unsigned in pss_reset_dsp() and pss_download_boot() 2009-12-17 12:19:12 +01:00
parisc ALSA: sound/parisc: Move dereference after NULL test 2009-10-30 12:01:38 +01:00
pci ALSA: hda - HDMI sticky stream tag support 2009-12-25 14:17:36 +01:00
pcmcia sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer 2009-12-18 12:53:17 +01:00
ppc Merge branch 'topic/beep-rename' into topic/core-change 2009-12-01 15:58:10 +01:00
sh Merge branch 'topic/beep-rename' into topic/core-change 2009-12-01 15:58:10 +01:00
soc Merge branch 'fix/asoc' into for-linus 2009-12-23 18:50:13 +01:00
sparc
spi
synth tree-wide: fix typos "couter" -> "counter" 2009-12-04 15:39:51 +01:00
usb sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer 2009-12-18 12:53:17 +01:00
ac97_bus.c
Kconfig tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
last.c
Makefile
sound_core.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
sound_firmware.c