ASoC: soc-core: Prevent warning if no DMI table is present
Subsystems (3)
Jon Hunter
maintainerPATCH 1/1 ASoC: soc-core: Prevent warning if no DMI table is present
Many systems do not provide a DMI table and on these systems a warning, such as the following, is printed on boot ...
WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name!
If DMI support is enabled in the kernel, there is no simple way to detect if a DMI table is table or not. Note that the variable 'dmi_available' is not exported and so cannot be used by kernel modules. It could be possible to have every ASoC sound card driver set the long name to avoid the above message, but it might be intentional for the long name, that we fall back to using the sound card name. Therefore, make this a debug print by default to avoid the warning.
--- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-core.c +1 -1
@@ -1576,7 +1576,7 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)/* make up dmi long name as: vendor-product-version-board */ vendor =dmi_get_system_info (DMI_BOARD_VENDOR );if (!vendor || !is_dmi_valid (vendor)) { -dev_warn (card->dev,"ASoC: no DMI vendor name!\n" ); +dev_dbg (card->dev,"ASoC: no DMI vendor name!\n" );return 0 ; }
Signature · 1 line
2.25.1
Mark Brown
maintainerQuoted 8 lines · Jon Hunter
Many systems do not provide a DMI table and on these systems a warning, such as the following, is printed on boot ...
WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name!
If DMI support is enabled in the kernel, there is no simple way to detect if a DMI table is table or not. Note that the variable '
dmi_available' is not exported and so cannot be used by kernel modules.
We could fix that, or provide an accessor function? Or only warn if we're on an ACPI system (which we can check from a module). This really does feel like something we should be warning about on systems that are supposed to have DMI information available as standard.
Quoted 7 lines · Mark Brown
Quoted 5 lines · Jon Hunter
Many systems do not provide a DMI table and on these systems a warning, such as the following, is printed on boot ...
WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name!
Quoted 8 lines
Quoted 3 lines
If DMI support is enabled in the kernel, there is no simple way to detect if a DMI table is table or not. Note that the variable '
dmi_available' is not exported and so cannot be used by kernel modules.We could fix that, or provide an accessor function? Or only warn if we're on an ACPI system (which we can check from a module). This really does feel like something we should be warning about on systems that are supposed to have DMI information available as standard.
I had the same feeling when I took a look at the patch, but later changed mind, since the error will pop up also if a system has an unmatured BIOS with some bogus vendor DMI string, too. That is, users of such a machine gets always an error message although this isn't any serious problem unless you need a dedicated UCM profile (which can't be used on such a system in anyway).
So, I agree that exporting dmi_avilable could improve the situation a bit, but the error level needs still reconsideration.
Takashi
Jon Hunter
maintainerQuoted 25 lines · Takashi Iwai
Quoted 7 lines · Mark Brown
Quoted 5 lines · Jon Hunter
Many systems do not provide a DMI table and on these systems a warning, such as the following, is printed on boot ...
WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name!
Quoted 8 lines
Quoted 3 lines
If DMI support is enabled in the kernel, there is no simple way to detect if a DMI table is table or not. Note that the variable '
dmi_available' is not exported and so cannot be used by kernel modules.We could fix that, or provide an accessor function? Or only warn if we're on an ACPI system (which we can check from a module). This really does feel like something we should be warning about on systems that are supposed to have DMI information available as standard.
I had the same feeling when I took a look at the patch, but later changed mind, since the error will pop up also if a system has an unmatured BIOS with some bogus vendor DMI string, too. That is, users of such a machine gets always an error message although this isn't any serious problem unless you need a dedicated UCM profile (which can't be used on such a system in anyway).
Quoted 2 lines
So, I agree that exporting
dmi_avilablecould improve the situation a bit, but the error level needs still reconsideration.
Thanks for the feedback. Yes it is probably better if we have a specific test. I will send out a V2 for review.
Thanks
Jon
Signature · 1 line
nvpublic