Skip to content

Commit 10e794b

Browse files
plbossarttiwai
authored andcommitted
ALSA: hda: clarify comments on SCF changes
The commit 1f9d3d9 ("ALSA: hda - set intel audio clock to a proper value") added a number of misleading comments. There is no ability to detect if an SCF value was set or not, what the code does is prevent the use of the 6MHz audio clock represented by the value 0 in LCTL.SCF. Changing the SCF settings does require the link to be power-cycled, but in all other cases the link is powered automatically when exiting reset. In other words, the power-cycle is an exception to the rule that the HDaudio legacy driver does not need to program SPA/CPA bits. In addition, the SCF related changes are only relevant for the first link. No functionality change, only comment clarifications. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Rander Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 46cf195 commit 10e794b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/pci/hda/hda_intel.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@ static int intel_ml_lctl_set_power(struct azx *chip, int state)
485485
int timeout;
486486

487487
/*
488-
* the codecs are sharing the first link setting by default
489-
* If other links are enabled for stream, they need similar fix
488+
* Changes to LCTL.SCF are only needed for the first multi-link dealing
489+
* with external codecs
490490
*/
491491
val = readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL);
492492
val &= ~AZX_ML_LCTL_SPA;
@@ -513,7 +513,7 @@ static void intel_init_lctl(struct azx *chip)
513513

514514
/* 0. check lctl register value is correct or not */
515515
val = readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL);
516-
/* if SCF is already set, let's use it */
516+
/* only perform additional configurations if the SCF is initially based on 6MHz */
517517
if ((val & AZX_ML_LCTL_SCF) != 0)
518518
return;
519519

@@ -531,7 +531,7 @@ static void intel_init_lctl(struct azx *chip)
531531
if (ret)
532532
goto set_spa;
533533

534-
/* 2. update SCF to select a properly audio clock*/
534+
/* 2. update SCF to select an audio clock different from 6MHz */
535535
val &= ~AZX_ML_LCTL_SCF;
536536
val |= intel_get_lctl_scf(chip);
537537
writel(val, bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL);

0 commit comments

Comments
 (0)