]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: Intel: ehl_rt5660: Use the correct rtd->dev device in hw_params
authorSachin Mokashi <sachin.mokashi@intel.com>
Fri, 27 Mar 2026 13:14:39 +0000 (09:14 -0400)
committerMark Brown <broonie@kernel.org>
Tue, 31 Mar 2026 11:37:13 +0000 (12:37 +0100)
In rt5660_hw_params(), the error path for snd_soc_dai_set_sysclk()
correctly uses rtd->dev as the logging device, but the error path for
snd_soc_dai_set_pll() uses codec_dai->dev instead.

These two devices are distinct:
- rtd->dev is the platform device of the PCM runtime (the Intel HDA/SSP
  controller, e.g. 0000:00:1f.3), which owns the machine driver callback.
- codec_dai->dev is the I2C device of the rt5660 codec itself
  (i2c-10EC5660:00).

Since hw_params is a machine driver operation and both calls are made
within the same function from the machine driver's context, all error
messages should be attributed to rtd->dev. Using codec_dai->dev for one
of them would suggest the error originates inside the codec driver,
which is misleading.

Align the PLL error log with the sysclk one to use rtd->dev, matching
the convention used by all other Intel board drivers in this directory.

Signed-off-by: Sachin Mokashi <sachin.mokashi@intel.com>
Link: https://patch.msgid.link/20260327131439.1330373-1-sachin.mokashi@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/ehl_rt5660.c

index 5c7b218f22b72fa36493f9b0e09e3c512ba6e123..c40cd9fb1a26c84df30f2d00c5951998a9e41a10 100644 (file)
@@ -127,7 +127,7 @@ static int rt5660_hw_params(struct snd_pcm_substream *substream,
                                  params_rate(params) * 50,
                                  params_rate(params) * 512);
        if (ret < 0)
-               dev_err(codec_dai->dev, "can't set codec pll: %d\n", ret);
+               dev_err(rtd->dev, "can't set codec pll: %d\n", ret);
 
        return ret;
 }