linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt286: Add API to set supported jack type
       [not found]   ` <ABFD875FF5FB574BA706497D987D48D7608E00@RTITMBSV03.realtek.com.tw>
@ 2014-08-07 17:31     ` Mark Brown
  2014-08-11  9:59       ` [alsa-devel] " Liam Girdwood
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2014-08-07 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 07, 2014 at 01:43:24AM +0000, Bard Liao wrote:

> > If this is coming from the hardware design I'd expect this to be configured
> > via platform data or firmware data rather than with an API.
> > Why do it this way?

> Actually, this patch is for Intel platform which doesn't support platform data
> yet. That's why we create an API so they can call the API in machine driver.

So, this is something that the people wanting to use ACPI in platforms
with devices like this are going to have to deal with - we need a way of
getting configuration to devices.  Traditionally small tweaks have been
done based on DMI information but that's not at all scalable.  I believe
newer ACPI specs are trying to accomodate this due to the expanding
range of systems supporting ACPI.  Punting to the machine driver just
moves the problem around, it doesn't really address it.

I've CCed in Graeme Gregory who's been writing some guidelines for this
sort of thing in the context of ARMv8 serviers - the most recent patch
is:

   http://thread.gmane.org/gmane.linux.acpi.devel/69757

The advice there looks good to me - see the "Device Enumeration"
section.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140807/f6928c49/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [alsa-devel] [PATCH] ASoC: rt286: Add API to set supported jack type
  2014-08-07 17:31     ` [PATCH] ASoC: rt286: Add API to set supported jack type Mark Brown
@ 2014-08-11  9:59       ` Liam Girdwood
  2014-08-11 12:24         ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Liam Girdwood @ 2014-08-11  9:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2014-08-07 at 18:31 +0100, Mark Brown wrote:
> On Thu, Aug 07, 2014 at 01:43:24AM +0000, Bard Liao wrote:
> 
> > > If this is coming from the hardware design I'd expect this to be configured
> > > via platform data or firmware data rather than with an API.
> > > Why do it this way?
> 
> > Actually, this patch is for Intel platform which doesn't support platform data
> > yet. That's why we create an API so they can call the API in machine driver.
> 
> So, this is something that the people wanting to use ACPI in platforms
> with devices like this are going to have to deal with - we need a way of
> getting configuration to devices.  Traditionally small tweaks have been
> done based on DMI information but that's not at all scalable.  I believe
> newer ACPI specs are trying to accomodate this due to the expanding
> range of systems supporting ACPI.  Punting to the machine driver just
> moves the problem around, it doesn't really address it.
> 

Unfortunately this will be needed for some Broadwell based BIOSes since
the timing of the ACPI spec/implementation has meant that some Broadwell
BIOSes will contain the data whilst most others wont atm :( 

> I've CCed in Graeme Gregory who's been writing some guidelines for this
> sort of thing in the context of ARMv8 serviers - the most recent patch
> is:
> 
>    http://thread.gmane.org/gmane.linux.acpi.devel/69757
> 
> The advice there looks good to me - see the "Device Enumeration"
> section.

This is indeed good, just too late for the initial Broadwell BIOSes that
wont have this _DSD field for the codec (it will be hard coded for
Windows anyway).

Liam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [alsa-devel] [PATCH] ASoC: rt286: Add API to set supported jack type
  2014-08-11  9:59       ` [alsa-devel] " Liam Girdwood
@ 2014-08-11 12:24         ` Mark Brown
  2014-08-14  8:29           ` Liam Girdwood
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2014-08-11 12:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 11, 2014 at 10:59:45AM +0100, Liam Girdwood wrote:
> On Thu, 2014-08-07 at 18:31 +0100, Mark Brown wrote:

> > I've CCed in Graeme Gregory who's been writing some guidelines for this
> > sort of thing in the context of ARMv8 serviers - the most recent patch
> > is:

> >    http://thread.gmane.org/gmane.linux.acpi.devel/69757

> > The advice there looks good to me - see the "Device Enumeration"
> > section.

> This is indeed good, just too late for the initial Broadwell BIOSes that
> wont have this _DSD field for the codec (it will be hard coded for
> Windows anyway).

Sounds like DMI is going to be needed then - whatever ends up being done
I'd expect it should just be a case of putting the checks done to work
out the machine configuration into the CODEC driver instead of the
machine driver.  If it looks ugly this can be used to explain to people
why we need something more sensible!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140811/735ec64f/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [alsa-devel] [PATCH] ASoC: rt286: Add API to set supported jack type
  2014-08-11 12:24         ` Mark Brown
@ 2014-08-14  8:29           ` Liam Girdwood
  2014-08-14 19:09             ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Liam Girdwood @ 2014-08-14  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 2014-08-11 at 13:24 +0100, Mark Brown wrote:
> On Mon, Aug 11, 2014 at 10:59:45AM +0100, Liam Girdwood wrote:
> > On Thu, 2014-08-07 at 18:31 +0100, Mark Brown wrote:
> 
> > > I've CCed in Graeme Gregory who's been writing some guidelines for this
> > > sort of thing in the context of ARMv8 serviers - the most recent patch
> > > is:
> 
> > >    http://thread.gmane.org/gmane.linux.acpi.devel/69757
> 
> > > The advice there looks good to me - see the "Device Enumeration"
> > > section.
> 
> > This is indeed good, just too late for the initial Broadwell BIOSes that
> > wont have this _DSD field for the codec (it will be hard coded for
> > Windows anyway).
> 
> Sounds like DMI is going to be needed then - whatever ends up being done
> I'd expect it should just be a case of putting the checks done to work
> out the machine configuration into the CODEC driver instead of the
> machine driver.  If it looks ugly this can be used to explain to people
> why we need something more sensible!

It sure will be ugly ;) This would involve the codec driver checking for
the existence of the Broadwell ADSP ACPI ID and then configuring jack
mode depending on whether it finds this ID or not.

We have the opposite implementation atm where the Broadwell machine
driver sets the jack mode at machine driver init time.

I'm not sure that showing ugly code here would help justify anything
either as we will kind of be at the mercy of whether the Windows driver
needs this information or not.

Liam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [alsa-devel] [PATCH] ASoC: rt286: Add API to set supported jack type
  2014-08-14  8:29           ` Liam Girdwood
@ 2014-08-14 19:09             ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-08-14 19:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 14, 2014 at 09:29:48AM +0100, Liam Girdwood wrote:
> On Mon, 2014-08-11 at 13:24 +0100, Mark Brown wrote:

> > Sounds like DMI is going to be needed then - whatever ends up being done
> > I'd expect it should just be a case of putting the checks done to work
> > out the machine configuration into the CODEC driver instead of the
> > machine driver.  If it looks ugly this can be used to explain to people
> > why we need something more sensible!

> It sure will be ugly ;) This would involve the codec driver checking for
> the existence of the Broadwell ADSP ACPI ID and then configuring jack
> mode depending on whether it finds this ID or not.

> We have the opposite implementation atm where the Broadwell machine
> driver sets the jack mode at machine driver init time.

> I'm not sure that showing ugly code here would help justify anything
> either as we will kind of be at the mercy of whether the Windows driver
> needs this information or not.

It's going to be ugly either way, it's just a question of how the code
get partitioned - I'd expect that whatever does this is going to end up
having to cope with working out which configuration to apply anyway.

What it does buy us is consistency in where these things get handled -
it's easier to have a consistent rule that the device is responsible for
platform data (wherever that actually comes from) than to have different
rules for different firmware styles and it'll help with back pressure on
other people who do care more about Linux even if it doesn't help with
the immediate use cases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140814/939d3f31/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-14 19:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1407217970-20126-1-git-send-email-bardliao@realtek.com>
     [not found] ` <20140806205421.GZ17528@sirena.org.uk>
     [not found]   ` <ABFD875FF5FB574BA706497D987D48D7608E00@RTITMBSV03.realtek.com.tw>
2014-08-07 17:31     ` [PATCH] ASoC: rt286: Add API to set supported jack type Mark Brown
2014-08-11  9:59       ` [alsa-devel] " Liam Girdwood
2014-08-11 12:24         ` Mark Brown
2014-08-14  8:29           ` Liam Girdwood
2014-08-14 19:09             ` Mark Brown

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).