Skip to content

Commit 25ded53

Browse files
harinworksgregkh
authored andcommitted
ALSA: ctxfi: Add fallback to default RSR for S/PDIF
commit 7d61662 upstream. spdif_passthru_playback_get_resources() uses atc->pll_rate as the RSR for the MSR calculation loop. However, pll_rate is only updated in atc_pll_init() and not in hw_pll_init(), so it remains 0 after the card init. When spdif_passthru_playback_setup() skips atc_pll_init() for 32000 Hz, (rsr * desc.msr) always becomes 0, causing the loop to spin indefinitely. Add fallback to use atc->rsr when atc->pll_rate is 0. This reflects the hardware state, since hw_card_init() already configures the PLL to the default RSR. Fixes: 8cc7236 ("ALSA: SB X-Fi driver merge") Cc: stable@vger.kernel.org Signed-off-by: Harin Lee <me@harin.net> Link: https://patch.msgid.link/20260406074913.217374-1-me@harin.net Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 831074e commit 25ded53

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sound/pci/ctxfi/ctatc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,8 @@ static int spdif_passthru_playback_get_resources(struct ct_atc *atc,
791791
struct src *src;
792792
int err;
793793
int n_amixer = apcm->substream->runtime->channels, i;
794-
unsigned int pitch, rsr = atc->pll_rate;
794+
unsigned int pitch;
795+
unsigned int rsr = atc->pll_rate ? atc->pll_rate : atc->rsr;
795796

796797
/* first release old resources */
797798
atc_pcm_release_resources(atc, apcm);

0 commit comments

Comments
 (0)