[alsa-devel] [PATCH] snd-sbxfi: set up the DAC at card initialization, regardless of duplex mode

William Pitcock nenolod at sacredspiral.co.uk
Sat Oct 18 20:59:46 CEST 2008


We should bring up the DAC at card initialization even in half-duplex mode,
otherwise we have to deal with unfortunate glitches in the hardware.

Constantly resetting the DAC can cause serious state desyncs, resulting in
the driver eventually not working until a reboot occurs.

Signed-off-by: William Pitcock <nenolod at sacredspiral.co.uk>
---
 sound/pci/sbxfi/sbxfi.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
index d64d462..30ad25b 100644
--- a/sound/pci/sbxfi/sbxfi.c
+++ b/sound/pci/sbxfi/sbxfi.c
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(debug, "Debug flag: 0 = disable");
 /* continuous rate support */
 #undef XXX_CONT_RATE
 
-/* full-duplex support */
+/* full duplex support */
 #undef XXX_FULL_DUPLEX
 
 /* multi playback - not implemented */
@@ -1364,10 +1364,6 @@ static int sbxfi_playback_prepare(struct snd_pcm_substream *substream)
 	port->frag_count = runtime->period_size;
 	port->need_update = 0;
 
-#ifndef XXX_FULL_DUPLEX
-	sbxfi_init_dac(chip);
-	sbxfi_setup_i2s(chip);
-#endif
 	sbxfi_setup_play_pitch(chip, port);
 	sbxfi_setup_play_mixer(chip, port);
 	sbxfi_setup_play_mapper(chip, port);
@@ -1924,10 +1920,8 @@ static int sbxfi_init_hw(struct sbxfi *chip)
 
 	sbxfi_daoimap_clear(chip);
 
-#ifdef XXX_FULL_DUPLEX
 	sbxfi_init_dac(chip);
 	sbxfi_setup_i2s(chip);
-#endif
 
 	return 0;
 }
-- 
1.5.5.4



More information about the Alsa-devel mailing list