* snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
@ 2017-04-27 18:00 Daniel Drake
2017-04-27 19:28 ` Pierre-Louis Bossart
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Drake @ 2017-04-27 18:00 UTC (permalink / raw)
To: alsa-devel; +Cc: liam.r.girdwood, Pierre-Louis Bossart
Hi,
Nice to see DMI info being attached to SoC sound devices so that we
can differentiate between differerent products in userspace, thanks
for the effort there.
However I just noticed that it using DMI_BOARD_VENDOR. Is this intentional?
I have several examples of products here where DMI_BOARD_VENDOR is not
set to a meaningful value, but DMI_SYS_VENDOR is just fine. DMI quirks
in the kernel ordinarily tend to match products by combining
DMI_SYS_VENDOR with DMI_PRODUCT_NAME.
In the SMBIOS data format, Type 1 (System information) includes
DMI_SYS_VENDOR and DMI_PRODUCT_NAME. Type 2 (Base board information)
includes DMI_BOARD_VENDOR and DMI_BOARD_NAME. See dmi_decode() in
drivers/firmware/dmi_scan.c
It seems strange that ASoC is pulling the product name from Type 1 but
the vendor from type 2. Can we make it instead just use Type 1 data,
DMI_SYS_VENDOR and DMI_PRODUCT_NAME?
Thanks
Daniel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-27 18:00 snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR? Daniel Drake
@ 2017-04-27 19:28 ` Pierre-Louis Bossart
2017-04-27 20:13 ` Daniel Drake
0 siblings, 1 reply; 11+ messages in thread
From: Pierre-Louis Bossart @ 2017-04-27 19:28 UTC (permalink / raw)
To: Daniel Drake, alsa-devel; +Cc: liam.r.girdwood
On 4/27/17 1:00 PM, Daniel Drake wrote:
> Hi,
>
> Nice to see DMI info being attached to SoC sound devices so that we
> can differentiate between differerent products in userspace, thanks
> for the effort there.
>
> However I just noticed that it using DMI_BOARD_VENDOR. Is this intentional?
>
> I have several examples of products here where DMI_BOARD_VENDOR is not
> set to a meaningful value, but DMI_SYS_VENDOR is just fine. DMI quirks
> in the kernel ordinarily tend to match products by combining
> DMI_SYS_VENDOR with DMI_PRODUCT_NAME.
>
> In the SMBIOS data format, Type 1 (System information) includes
> DMI_SYS_VENDOR and DMI_PRODUCT_NAME. Type 2 (Base board information)
> includes DMI_BOARD_VENDOR and DMI_BOARD_NAME. See dmi_decode() in
> drivers/firmware/dmi_scan.c
>
> It seems strange that ASoC is pulling the product name from Type 1 but
> the vendor from type 2. Can we make it instead just use Type 1 data,
> DMI_SYS_VENDOR and DMI_PRODUCT_NAME?
There is a bit of variability here, the quirks we use are based on:
DMI_BOARD_VENDOR
DMI_SYS_VENDOR
DMI_PRODUCT_NAME
DMI_PRODUCT_VERSION (typically for Lenovo programs)
DMI_BOARD_NAME (for reference designs)
Not sure if we can really limit the conventions to type1 or type2 if we
want the names to be somewhat meaningful.
I can't recall why we selected DMI_BOARD_VENDOR instead of
DMI_SYS_VENDOR though.
>
> Thanks
> Daniel
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-27 19:28 ` Pierre-Louis Bossart
@ 2017-04-27 20:13 ` Daniel Drake
2017-04-27 20:32 ` Pierre-Louis Bossart
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Drake @ 2017-04-27 20:13 UTC (permalink / raw)
To: Pierre-Louis Bossart; +Cc: liam.r.girdwood, alsa-devel
On Thu, Apr 27, 2017 at 1:28 PM, Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> Not sure if we can really limit the conventions to type1 or type2 if we want
> the names to be somewhat meaningful.
>
> I can't recall why we selected DMI_BOARD_VENDOR instead of DMI_SYS_VENDOR
> though.
Is it too late to change to DMI_SYS_VENDOR? Or to have both present in
the string?
Thanks
Daniel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-27 20:13 ` Daniel Drake
@ 2017-04-27 20:32 ` Pierre-Louis Bossart
2017-04-27 21:02 ` Daniel Drake
0 siblings, 1 reply; 11+ messages in thread
From: Pierre-Louis Bossart @ 2017-04-27 20:32 UTC (permalink / raw)
To: Daniel Drake; +Cc: liam.r.girdwood, Lin, Mengdong, alsa-devel
On 04/27/2017 03:13 PM, Daniel Drake wrote:
> On Thu, Apr 27, 2017 at 1:28 PM, Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
>> Not sure if we can really limit the conventions to type1 or type2 if we want
>> the names to be somewhat meaningful.
>>
>> I can't recall why we selected DMI_BOARD_VENDOR instead of DMI_SYS_VENDOR
>> though.
> Is it too late to change to DMI_SYS_VENDOR? Or to have both present in
> the string?
While in general DMI_SYS_VENDOR is commonly used, there are exceptions
to the rule, such as the very machine I am working on at the moment
which does have any useful DMI_SYS_VENDOR information (see below)
Mengdong may be able to comment on why we took this direction.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer:
Product Name:
Version:
Serial Number:
UUID: 6DD3E1A2-7A70-41FC-917A-231C2C4E2E4E
Wake-up Type: Power Switch
SKU Number:
Family:
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Intel Corporation
Product Name: NUC6i7KYB
Version: H90766-405
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-27 20:32 ` Pierre-Louis Bossart
@ 2017-04-27 21:02 ` Daniel Drake
2017-04-28 8:36 ` Takashi Iwai
2017-04-28 10:35 ` Liam Girdwood
0 siblings, 2 replies; 11+ messages in thread
From: Daniel Drake @ 2017-04-27 21:02 UTC (permalink / raw)
To: Pierre-Louis Bossart; +Cc: liam.r.girdwood, Lin, Mengdong, alsa-devel
On Thu, Apr 27, 2017 at 2:32 PM, Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> While in general DMI_SYS_VENDOR is commonly used, there are exceptions to
> the rule, such as the very machine I am working on at the moment which does
> have any useful DMI_SYS_VENDOR information (see below)
> Mengdong may be able to comment on why we took this direction.
In a DMI database of 113 PC models that we have worked with here:
112 have correct/meaningful sys_vendor, 1 is useless (To be filled by OEM)
106 have correct board_vendor, 7 have incorrect or useless values
And awkwardly the one system that I'd like to match in UCM rules here
has correct sys_vendor but bad board_vendor.
Daniel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-27 21:02 ` Daniel Drake
@ 2017-04-28 8:36 ` Takashi Iwai
2017-04-28 10:35 ` Liam Girdwood
1 sibling, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2017-04-28 8:36 UTC (permalink / raw)
To: Daniel Drake
Cc: liam.r.girdwood, Lin, Mengdong, alsa-devel, Pierre-Louis Bossart
On Thu, 27 Apr 2017 23:02:31 +0200,
Daniel Drake wrote:
>
> On Thu, Apr 27, 2017 at 2:32 PM, Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
> > While in general DMI_SYS_VENDOR is commonly used, there are exceptions to
> > the rule, such as the very machine I am working on at the moment which does
> > have any useful DMI_SYS_VENDOR information (see below)
> > Mengdong may be able to comment on why we took this direction.
>
> In a DMI database of 113 PC models that we have worked with here:
>
> 112 have correct/meaningful sys_vendor, 1 is useless (To be filled by OEM)
> 106 have correct board_vendor, 7 have incorrect or useless values
>
> And awkwardly the one system that I'd like to match in UCM rules here
> has correct sys_vendor but bad board_vendor.
We may be a bit smarter and try another field if such a string ("To be
filled by OEM", "Default String") is found, too. Not sure whether
it's the right move, though.
The function hasn't been applied widely until now, so changing it
would be still OK until 4.12-final release. If we really need to
change this, let's fix now.
thanks,
Takashi
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-27 21:02 ` Daniel Drake
2017-04-28 8:36 ` Takashi Iwai
@ 2017-04-28 10:35 ` Liam Girdwood
2017-04-28 15:02 ` Lin, Mengdong
1 sibling, 1 reply; 11+ messages in thread
From: Liam Girdwood @ 2017-04-28 10:35 UTC (permalink / raw)
To: Daniel Drake; +Cc: Lin, Mengdong, alsa-devel, Pierre-Louis Bossart
On Thu, 2017-04-27 at 15:02 -0600, Daniel Drake wrote:
> On Thu, Apr 27, 2017 at 2:32 PM, Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
> > While in general DMI_SYS_VENDOR is commonly used, there are exceptions to
> > the rule, such as the very machine I am working on at the moment which does
> > have any useful DMI_SYS_VENDOR information (see below)
> > Mengdong may be able to comment on why we took this direction.
>
I think it was probably due to our limited number of test machines all
reporting better info via DMI_BOARD_VENDOR.
> In a DMI database of 113 PC models that we have worked with here:
>
> 112 have correct/meaningful sys_vendor, 1 is useless (To be filled by OEM)
> 106 have correct board_vendor, 7 have incorrect or useless values
>
> And awkwardly the one system that I'd like to match in UCM rules here
> has correct sys_vendor but bad board_vendor.
>
So given your larger database is showing better results for
DMI_SYS_VENDOR it may be best to try this first and if that's NULL then
use DMI_BOARD_VENDOR.
Would you care to submit a patch ? or Mengdong ? Sorry, I wont be able
to get to this for a week due to some travel.
Thanks
Liam
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-28 10:35 ` Liam Girdwood
@ 2017-04-28 15:02 ` Lin, Mengdong
2017-04-28 16:21 ` Lin, Mengdong
0 siblings, 1 reply; 11+ messages in thread
From: Lin, Mengdong @ 2017-04-28 15:02 UTC (permalink / raw)
To: Liam Girdwood, Daniel Drake
Cc: alsa-devel@alsa-project.org, Pierre-Louis Bossart
> -----Original Message-----
> From: Liam Girdwood [mailto:liam.r.girdwood@linux.intel.com]
> Sent: Friday, April 28, 2017 6:35 PM
> To: Daniel Drake <drake@endlessm.com>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>; alsa-
> devel@alsa-project.org; Lin, Mengdong <mengdong.lin@intel.com>
> Subject: Re: [alsa-devel] snd_soc_set_dmi_name - Shouldn't it use
> SYS_VENDOR?
>
> On Thu, 2017-04-27 at 15:02 -0600, Daniel Drake wrote:
> > On Thu, Apr 27, 2017 at 2:32 PM, Pierre-Louis Bossart
> > <pierre-louis.bossart@linux.intel.com> wrote:
> > > While in general DMI_SYS_VENDOR is commonly used, there are
> > > exceptions to the rule, such as the very machine I am working on at
> > > the moment which does have any useful DMI_SYS_VENDOR information
> > > (see below) Mengdong may be able to comment on why we took this
> direction.
> >
>
> I think it was probably due to our limited number of test machines all
> reporting better info via DMI_BOARD_VENDOR.
>
> > In a DMI database of 113 PC models that we have worked with here:
> >
> > 112 have correct/meaningful sys_vendor, 1 is useless (To be filled by
> > OEM)
> > 106 have correct board_vendor, 7 have incorrect or useless values
> >
> > And awkwardly the one system that I'd like to match in UCM rules here
> > has correct sys_vendor but bad board_vendor.
> >
>
> So given your larger database is showing better results for DMI_SYS_VENDOR
> it may be best to try this first and if that's NULL then use
> DMI_BOARD_VENDOR.
Yes, it’s better to only use one name. Otherwise, it's possible to exceed 80 characters limit for the card long name since sometimes DMI fields can be long.
>
> Would you care to submit a patch ? or Mengdong ? Sorry, I wont be able to
> get to this for a week due to some travel.
>
I will fix this early next week after double checking my machines on hand.
Daniel's database is much larger than my test set and so we need to support :-)
Thanks
Mengdong
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-28 15:02 ` Lin, Mengdong
@ 2017-04-28 16:21 ` Lin, Mengdong
2017-04-29 15:27 ` Daniel Drake
0 siblings, 1 reply; 11+ messages in thread
From: Lin, Mengdong @ 2017-04-28 16:21 UTC (permalink / raw)
To: Lin, Mengdong, Liam Girdwood, Daniel Drake
Cc: alsa-devel@alsa-project.org, Pierre-Louis Bossart
> -----Original Message-----
> From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-
> bounces@alsa-project.org] On Behalf Of Lin, Mengdong
> Sent: Friday, April 28, 2017 11:03 PM
> >
> > I think it was probably due to our limited number of test machines all
> > reporting better info via DMI_BOARD_VENDOR.
> >
> > > In a DMI database of 113 PC models that we have worked with here:
> > >
> > > 112 have correct/meaningful sys_vendor, 1 is useless (To be filled
> > > by
> > > OEM)
> > > 106 have correct board_vendor, 7 have incorrect or useless values
> > >
> > > And awkwardly the one system that I'd like to match in UCM rules
> > > here has correct sys_vendor but bad board_vendor.
> > >
> >
> > So given your larger database is showing better results for
> > DMI_SYS_VENDOR it may be best to try this first and if that's NULL
> > then use DMI_BOARD_VENDOR.
>
> Yes, it’s better to only use one name. Otherwise, it's possible to exceed 80
> characters limit for the card long name since sometimes DMI fields can be
> long.
>
> >
> > Would you care to submit a patch ? or Mengdong ? Sorry, I wont be
> > able to get to this for a week due to some travel.
> >
>
> I will fix this early next week after double checking my machines on hand.
> Daniel's database is much larger than my test set and so we need to
> support :-)
I just submitted a patch to fix this http://mailman.alsa-project.org/pipermail/alsa-devel/2017-April/120271.html
It passed building and I will test it next Tuesday. 3 Intel machines may have null DMI_SYS_VENDOR.
Thanks
Mengdong
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-28 16:21 ` Lin, Mengdong
@ 2017-04-29 15:27 ` Daniel Drake
2017-05-02 10:19 ` Mengdong Lin
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Drake @ 2017-04-29 15:27 UTC (permalink / raw)
To: Lin, Mengdong
Cc: Liam Girdwood, alsa-devel@alsa-project.org, Pierre-Louis Bossart
Hi,
On Fri, Apr 28, 2017 at 10:21 AM, Lin, Mengdong <mengdong.lin@intel.com> wrote:
> I just submitted a patch to fix this http://mailman.alsa-project.org/pipermail/alsa-devel/2017-April/120271.html
> It passed building and I will test it next Tuesday. 3 Intel machines may have null DMI_SYS_VENDOR.
Thanks! I tested the patch on my platform here, and it is working
correctly, I now get the expected vendor name appearing in the string.
Daniel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR?
2017-04-29 15:27 ` Daniel Drake
@ 2017-05-02 10:19 ` Mengdong Lin
0 siblings, 0 replies; 11+ messages in thread
From: Mengdong Lin @ 2017-05-02 10:19 UTC (permalink / raw)
To: Daniel Drake, Lin, Mengdong
Cc: Liam Girdwood, alsa-devel@alsa-project.org, Pierre-Louis Bossart
On 04/29/2017 11:27 PM, Daniel Drake wrote:
> Hi,
>
> On Fri, Apr 28, 2017 at 10:21 AM, Lin, Mengdong <mengdong.lin@intel.com> wrote:
>> I just submitted a patch to fix this http://mailman.alsa-project.org/pipermail/alsa-devel/2017-April/120271.html
>> It passed building and I will test it next Tuesday. 3 Intel machines may have null DMI_SYS_VENDOR.
>
> Thanks! I tested the patch on my platform here, and it is working
> correctly, I now get the expected vendor name appearing in the string.
>
> Daniel
> _______________________________________________
Many thanks for testing on your platforms! It also works on my
platforms today.
Regards
Mengdong
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-05-02 10:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27 18:00 snd_soc_set_dmi_name - Shouldn't it use SYS_VENDOR? Daniel Drake
2017-04-27 19:28 ` Pierre-Louis Bossart
2017-04-27 20:13 ` Daniel Drake
2017-04-27 20:32 ` Pierre-Louis Bossart
2017-04-27 21:02 ` Daniel Drake
2017-04-28 8:36 ` Takashi Iwai
2017-04-28 10:35 ` Liam Girdwood
2017-04-28 15:02 ` Lin, Mengdong
2017-04-28 16:21 ` Lin, Mengdong
2017-04-29 15:27 ` Daniel Drake
2017-05-02 10:19 ` Mengdong Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).