[PATCH 0/4] ASoC: Intel: fix missing .owner fields
Fix omission of .owner = THIS_MODULE in Intel and SOF cards. Thanks to Jaroslav and Takashi for reporting and suggesting a fix.
Pierre-Louis Bossart (4): ASoC: SOF: nocodec: add missing .owner field ASoC: Intel: cml_rt1011_rt5682: add missing .owner field ASoC: Intel: sof_sdw: add missing .owner field ASoC: Intel: bxt_rt298: add missing .owner field
sound/soc/intel/boards/bxt_rt298.c | 2 ++ sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 + sound/soc/intel/boards/sof_sdw.c | 2 +- sound/soc/sof/nocodec.c | 1 + 4 files changed, 5 insertions(+), 1 deletion(-)
base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172
This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as
cat /proc/asound/modules 0 (efault)
Reported-by: Jaroslav Kysela perex@perex.cz Suggested-by: Takashi Iwai tiwai@suse.de Fixes: 8017b8fd37bf ('ASoC: SOF: Add Nocodec machine driver support') Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Kai Vehmanen kai.vehmanen@linux.intel.com --- sound/soc/sof/nocodec.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c index d03b5be31255..9e922df6a710 100644 --- a/sound/soc/sof/nocodec.c +++ b/sound/soc/sof/nocodec.c @@ -14,6 +14,7 @@
static struct snd_soc_card sof_nocodec_card = { .name = "nocodec", /* the sof- prefix is added by the core */ + .owner = THIS_MODULE };
static int sof_nocodec_bes_setup(struct device *dev,
This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as
cat /proc/asound/modules 0 (efault)
Reported-by: Jaroslav Kysela perex@perex.cz Suggested-by: Takashi Iwai tiwai@suse.de Fixes: 17fe95d6df93 ('ASoC: Intel: boards: Add CML m/c using RT1011 and RT5682') Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Kai Vehmanen kai.vehmanen@linux.intel.com --- sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/soc/intel/boards/cml_rt1011_rt5682.c b/sound/soc/intel/boards/cml_rt1011_rt5682.c index 189c908c4aa8..6e8934f348ef 100644 --- a/sound/soc/intel/boards/cml_rt1011_rt5682.c +++ b/sound/soc/intel/boards/cml_rt1011_rt5682.c @@ -501,6 +501,7 @@ static struct snd_soc_codec_conf rt1011_conf[] = { /* Cometlake audio machine driver for RT1011 and RT5682 */ static struct snd_soc_card snd_soc_card_cml = { .name = "cml_rt1011_rt5682", + .owner = THIS_MODULE, .dai_link = cml_rt1011_rt5682_dailink, .num_links = ARRAY_SIZE(cml_rt1011_rt5682_dailink), .codec_conf = rt1011_conf,
This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as
cat /proc/asound/modules 0 (efault)
Reported-by: Jaroslav Kysela perex@perex.cz Suggested-by: Takashi Iwai tiwai@suse.de Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver') Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Kai Vehmanen kai.vehmanen@linux.intel.com --- sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index e1c1a8ba78e6..d26b82526163 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -893,7 +893,7 @@ static const char sdw_card_long_name[] = "Intel Soundwire SOF";
static struct snd_soc_card card_sof_sdw = { .name = "soundwire", - .late_probe = sof_sdw_hdmi_card_late_probe, + .owner = THIS_MODULE, .codec_conf = codec_conf, .num_configs = ARRAY_SIZE(codec_conf), };
On 2020-06-25 8:06 PM, Pierre-Louis Bossart wrote:
This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as
cat /proc/asound/modules 0 (efault)
Reported-by: Jaroslav Kysela perex@perex.cz Suggested-by: Takashi Iwai tiwai@suse.de Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver') Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Kai Vehmanen kai.vehmanen@linux.intel.com
sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index e1c1a8ba78e6..d26b82526163 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -893,7 +893,7 @@ static const char sdw_card_long_name[] = "Intel Soundwire SOF";
static struct snd_soc_card card_sof_sdw = { .name = "soundwire",
- .late_probe = sof_sdw_hdmi_card_late_probe,
Deletion of .late_probe looks off in this patch. Typo?
- .owner = THIS_MODULE, .codec_conf = codec_conf, .num_configs = ARRAY_SIZE(codec_conf), };
On 6/25/20 1:24 PM, Cezary Rojewski wrote:
On 2020-06-25 8:06 PM, Pierre-Louis Bossart wrote:
This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as
cat /proc/asound/modules 0 (efault)
Reported-by: Jaroslav Kysela perex@perex.cz Suggested-by: Takashi Iwai tiwai@suse.de Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver') Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Kai Vehmanen kai.vehmanen@linux.intel.com
sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index e1c1a8ba78e6..d26b82526163 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -893,7 +893,7 @@ static const char sdw_card_long_name[] = "Intel Soundwire SOF"; static struct snd_soc_card card_sof_sdw = { .name = "soundwire", - .late_probe = sof_sdw_hdmi_card_late_probe,
Deletion of .late_probe looks off in this patch. Typo?
Thanks for spotting this, will send a fix. I did fix that conflict, I must have screw something up at a later stage.
+ .owner = THIS_MODULE, .codec_conf = codec_conf, .num_configs = ARRAY_SIZE(codec_conf), };
This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as
cat /proc/asound/modules 0 (efault)
Reported-by: Jaroslav Kysela perex@perex.cz Suggested-by: Takashi Iwai tiwai@suse.de Fixes: 76016322ec56 ('ASoC: Intel: Add Broxton-P machine driver') Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Kai Vehmanen kai.vehmanen@linux.intel.com --- sound/soc/intel/boards/bxt_rt298.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index 7a4decf34191..c84c60df17db 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c @@ -565,6 +565,7 @@ static int bxt_card_late_probe(struct snd_soc_card *card) /* broxton audio machine driver for SPT + RT298S */ static struct snd_soc_card broxton_rt298 = { .name = "broxton-rt298", + .owner = THIS_MODULE, .dai_link = broxton_rt298_dais, .num_links = ARRAY_SIZE(broxton_rt298_dais), .controls = broxton_controls, @@ -580,6 +581,7 @@ static struct snd_soc_card broxton_rt298 = {
static struct snd_soc_card geminilake_rt298 = { .name = "geminilake-rt298", + .owner = THIS_MODULE, .dai_link = broxton_rt298_dais, .num_links = ARRAY_SIZE(broxton_rt298_dais), .controls = broxton_controls,
On 2020-06-25 8:06 PM, Pierre-Louis Bossart wrote:
Fix omission of .owner = THIS_MODULE in Intel and SOF cards. Thanks to Jaroslav and Takashi for reporting and suggesting a fix.
Pierre-Louis Bossart (4): ASoC: SOF: nocodec: add missing .owner field ASoC: Intel: cml_rt1011_rt5682: add missing .owner field ASoC: Intel: sof_sdw: add missing .owner field ASoC: Intel: bxt_rt298: add missing .owner field
sound/soc/intel/boards/bxt_rt298.c | 2 ++ sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 + sound/soc/intel/boards/sof_sdw.c | 2 +- sound/soc/sof/nocodec.c | 1 + 4 files changed, 5 insertions(+), 1 deletion(-)
base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172
Apart for small question in 3/4 patch, looks good. Thanks Pierre!
Acked-by: Cezary Rojewski cezary.rojewski@intel.com
On 6/25/20 1:06 PM, Pierre-Louis Bossart wrote:
Fix omission of .owner = THIS_MODULE in Intel and SOF cards. Thanks to Jaroslav and Takashi for reporting and suggesting a fix.
Sorry for the noise, please discard this series. I will add this in a separate machine driver update to avoid conflicts.
Pierre-Louis Bossart (4): ASoC: SOF: nocodec: add missing .owner field ASoC: Intel: cml_rt1011_rt5682: add missing .owner field ASoC: Intel: sof_sdw: add missing .owner field ASoC: Intel: bxt_rt298: add missing .owner field
sound/soc/intel/boards/bxt_rt298.c | 2 ++ sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 + sound/soc/intel/boards/sof_sdw.c | 2 +- sound/soc/sof/nocodec.c | 1 + 4 files changed, 5 insertions(+), 1 deletion(-)
base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172
participants (2)
-
Cezary Rojewski
-
Pierre-Louis Bossart