ALSA: hda - stop setup_dig_out_stream() causing clicks
authorLaurence Darby <ldarby@tuffmail.com>
Sat, 3 Nov 2012 17:00:06 +0000 (17:00 +0000)
committerTakashi Iwai <tiwai@suse.de>
Sun, 4 Nov 2012 08:17:28 +0000 (09:17 +0100)
commit3bef1c377d1bd8fd879ee5a66cf6f45ba16820cd
treef0c8f9779c99a569e54285f31d8c303149d83bbb
parenta5d00dc3a4b65ed38249f3225e453944c633747b
ALSA: hda - stop setup_dig_out_stream() causing clicks

Starting audio or seeking in various music players causes
setup_dig_out_stream() to be called, which resets the SPDIF stream,
which caused one DAC (but not another) to make a clicking noise every
time.

This patch ensures the reset only happens when it needs to, which is
when the format changes, and makes the code a little more readable.

Signed-off-by: Laurence Darby <ldarby@tuffmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c