Skip to contentSkip to conversation

ALSA: ctxfi: Fix silent playback on Titanium HD (SB1270)

PATCH In review Harin Lee 2 participants 2 messages Sep 30

Subsystems (2)
lore
Share & tools
lore

Harin Lee

author
#0 lore raw

PATCH 1/1 ALSA: ctxfi: Fix silent playback on Titanium HD (SB1270)

Commit 4b490e0d103c ("ALSA: ctxfi: Add ADC helper functions for GPIO") moved the GPIO_DATA read into hw_adc_stop(), but the Titanium HD (SB1270) setup in hw_adc_init() uses the local data variable holding the GPIO_CTRL value.

Writing this value to GPIO_DATA sets the output mute bits. Playback runs without errors, but the outputs stay muted.

Re-read GPIO_DATA before setting the speed mode bits. Also, add the delay after writing the mode bits, as in the original sequence.

On affected kernels, switching the output selection was reported to restore clean playback.

---
 sound/pci/ctxfi/cthw20k2.c | 2 ++
 1 file changed, 2 insertions(+)
sound/pci/ctxfi/cthw20k2.c +2 -0
index 36066ffe8784..26a6fa69f5f5 100644
@@ -1895,6 +1895,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
 
 	if (hw->model == CTSB1270) {
 		/* Set up the PCM4220 ADC on Titanium HD */
+		data = hw_read_20kx(hw, GPIO_DATA);
 		data &= ~0x0C;
 		if (1 == info->msr)
 			data |= 0x00; /* Single Speed Mode 32-50kHz */
@@ -1903,6 +1904,7 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
 		else
 			data |= 0x04; /* Quad Speed Mode 108kHz-216kHz */
 		hw_write_20kx(hw, GPIO_DATA, data);
+		usleep_range(10000, 11000);
 	}
 
 	hw_adc_start(hw);
Signature · 1 line
2.55.0
#1 lore raw
Quoted 12 lines · Harin Lee

Commit 4b490e0d103c ("ALSA: ctxfi: Add ADC helper functions for GPIO") moved the GPIO_DATA read into hw_adc_stop(), but the Titanium HD (SB1270) setup in hw_adc_init() uses the local data variable holding the GPIO_CTRL value.

Writing this value to GPIO_DATA sets the output mute bits. Playback runs without errors, but the outputs stay muted.

Re-read GPIO_DATA before setting the speed mode bits. Also, add the delay after writing the mode bits, as in the original sequence.

Quoted 8 lines

On affected kernels, switching the output selection was reported to restore clean playback.

Applied now. Thanks.

Takashi