All of lore.kernel.org
 help / color / mirror / Atom feed
* Triple implementation of WM8766 and quadruple WM8776!
@ 2012-03-12 21:40 Ondrej Zary
  2012-03-13  9:46   ` Clemens Ladisch
  0 siblings, 1 reply; 7+ messages in thread
From: Ondrej Zary @ 2012-03-12 21:40 UTC (permalink / raw)
  To: alsa-devel; +Cc: Kernel development list

Hello,
I'm trying do implement support for Philips PSC724 Ultimate Edge card, which 
is based on VT1722 + WM8776 + WM8766 chips. Found that the best file to base 
my work on is sound/pci/ice1712/se.c (as SE-200PCI card contains both WM8776 
and WM8766 chips).

While doing this, found that there are three implementations of WM8766 codec 
control, two of them in the same driver(!):
sound/pci/ice1712/se.c
sound/pci/ice1712/prodigy_hifi.c
sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8766.h)

And WM8776 status is even worse, there are four implementations, again two 
being in the same driver:
sound/pci/ice1712/se.c
sound/pci/ice1712/maya44.c
sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8776.h)
sound/soc/codecs/wm8776.c (this one being official and stand-alone module but 
it does not seem to be usable as a part of sound card driver)

My code would enlarge both of these lists and I don't like that. What to do?

-- 
Ondrej Zary

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

* Re: [alsa-devel] Triple implementation of WM8766 and quadruple WM8776!
  2012-03-12 21:40 Triple implementation of WM8766 and quadruple WM8776! Ondrej Zary
@ 2012-03-13  9:46   ` Clemens Ladisch
  0 siblings, 0 replies; 7+ messages in thread
From: Clemens Ladisch @ 2012-03-13  9:46 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: alsa-devel, linux-kernel

Ondrej Zary wrote:
> I'm trying do implement support for Philips PSC724 Ultimate Edge card, which
> is based on VT1722 + WM8776 + WM8766 chips. Found that the best file to base
> my work on is sound/pci/ice1712/se.c (as SE-200PCI card contains both WM8776
> and WM8766 chips).
>
> While doing this, found that there are three implementations of WM8766 codec
> control, two of them in the same driver(!):
> sound/pci/ice1712/se.c
> sound/pci/ice1712/prodigy_hifi.c
> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8766.h)
>
> And WM8776 status is even worse, there are four implementations, again two
> being in the same driver:
> sound/pci/ice1712/se.c
> sound/pci/ice1712/maya44.c
> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8776.h)
> sound/soc/codecs/wm8776.c (this one being official and stand-alone module but
> it does not seem to be usable as a part of sound card driver)

The ALSA SoC framework differentiates between three kinds of drivers:
codec, platform (controllers like the VT1722), and machine (in your
case, the wiring on the PSC724).  When I wrote the oxygen driver,
I didn't use ASoC because it didn't support multiple codecs per card
at that time (now it does).

I'd suggest to use ASoC, except that ice1724 is not an ASoC platform
driver, so you'd have to duplicate it.

All the non-ASoC drivers mix codec and machine drivers in the same file.
In the long term, ice1712 and oxygen should be converted to use ASoC,
but that would be a lot of effort if regressions are to be avoided.

I'd suggest to move the common parts of the three ice1712 drivers into
separate files.  You could make the interface of those files similar to
ASoC codec drivers to make later porting easier.


Regards,
Clemens

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

* Re: Triple implementation of WM8766 and quadruple WM8776!
@ 2012-03-13  9:46   ` Clemens Ladisch
  0 siblings, 0 replies; 7+ messages in thread
From: Clemens Ladisch @ 2012-03-13  9:46 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: alsa-devel, linux-kernel

Ondrej Zary wrote:
> I'm trying do implement support for Philips PSC724 Ultimate Edge card, which
> is based on VT1722 + WM8776 + WM8766 chips. Found that the best file to base
> my work on is sound/pci/ice1712/se.c (as SE-200PCI card contains both WM8776
> and WM8766 chips).
>
> While doing this, found that there are three implementations of WM8766 codec
> control, two of them in the same driver(!):
> sound/pci/ice1712/se.c
> sound/pci/ice1712/prodigy_hifi.c
> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8766.h)
>
> And WM8776 status is even worse, there are four implementations, again two
> being in the same driver:
> sound/pci/ice1712/se.c
> sound/pci/ice1712/maya44.c
> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8776.h)
> sound/soc/codecs/wm8776.c (this one being official and stand-alone module but
> it does not seem to be usable as a part of sound card driver)

The ALSA SoC framework differentiates between three kinds of drivers:
codec, platform (controllers like the VT1722), and machine (in your
case, the wiring on the PSC724).  When I wrote the oxygen driver,
I didn't use ASoC because it didn't support multiple codecs per card
at that time (now it does).

I'd suggest to use ASoC, except that ice1724 is not an ASoC platform
driver, so you'd have to duplicate it.

All the non-ASoC drivers mix codec and machine drivers in the same file.
In the long term, ice1712 and oxygen should be converted to use ASoC,
but that would be a lot of effort if regressions are to be avoided.

I'd suggest to move the common parts of the three ice1712 drivers into
separate files.  You could make the interface of those files similar to
ASoC codec drivers to make later porting easier.


Regards,
Clemens

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

* Re: Triple implementation of WM8766 and quadruple WM8776!
  2012-03-13  9:46   ` Clemens Ladisch
  (?)
@ 2012-03-13  9:53   ` Pavel Hofman
  2012-03-13  9:58     ` Takashi Iwai
  2012-03-13 21:31     ` Mark Brown
  -1 siblings, 2 replies; 7+ messages in thread
From: Pavel Hofman @ 2012-03-13  9:53 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel, Ondrej Zary

Dne 13.3.2012 10:46, Clemens Ladisch napsal(a):
> Ondrej Zary wrote:
>> I'm trying do implement support for Philips PSC724 Ultimate Edge card, which
>> is based on VT1722 + WM8776 + WM8766 chips. Found that the best file to base
>> my work on is sound/pci/ice1712/se.c (as SE-200PCI card contains both WM8776
>> and WM8766 chips).
>>
>> While doing this, found that there are three implementations of WM8766 codec
>> control, two of them in the same driver(!):
>> sound/pci/ice1712/se.c
>> sound/pci/ice1712/prodigy_hifi.c
>> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8766.h)
>>
>> And WM8776 status is even worse, there are four implementations, again two
>> being in the same driver:
>> sound/pci/ice1712/se.c
>> sound/pci/ice1712/maya44.c
>> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8776.h)
>> sound/soc/codecs/wm8776.c (this one being official and stand-alone module but
>> it does not seem to be usable as a part of sound card driver)
> 
.....
> 
> I'd suggest to move the common parts of the three ice1712 drivers into
> separate files.  You could make the interface of those files similar to
> ASoC codec drivers to make later porting easier.

How about a solution similar to AKM codecs in i2c/other? Several ice1724
cards make use of those modules, easy to support and re-use. IMO cleaner
approach than duplicating ICE1724 to the ASoC framework.

Pavel.

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

* Re: Triple implementation of WM8766 and quadruple WM8776!
  2012-03-13  9:53   ` Pavel Hofman
@ 2012-03-13  9:58     ` Takashi Iwai
  2012-03-13 10:05       ` Pavel Hofman
  2012-03-13 21:31     ` Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2012-03-13  9:58 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: Ondrej Zary, alsa-devel, Clemens Ladisch

At Tue, 13 Mar 2012 10:53:09 +0100,
Pavel Hofman wrote:
> 
> Dne 13.3.2012 10:46, Clemens Ladisch napsal(a):
> > Ondrej Zary wrote:
> >> I'm trying do implement support for Philips PSC724 Ultimate Edge card, which
> >> is based on VT1722 + WM8776 + WM8766 chips. Found that the best file to base
> >> my work on is sound/pci/ice1712/se.c (as SE-200PCI card contains both WM8776
> >> and WM8766 chips).
> >>
> >> While doing this, found that there are three implementations of WM8766 codec
> >> control, two of them in the same driver(!):
> >> sound/pci/ice1712/se.c
> >> sound/pci/ice1712/prodigy_hifi.c
> >> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8766.h)
> >>
> >> And WM8776 status is even worse, there are four implementations, again two
> >> being in the same driver:
> >> sound/pci/ice1712/se.c
> >> sound/pci/ice1712/maya44.c
> >> sound/pci/oxygen/xonar_wm87x6.c (+sound/pci/oxygen/wm8776.h)
> >> sound/soc/codecs/wm8776.c (this one being official and stand-alone module but
> >> it does not seem to be usable as a part of sound card driver)
> > 
> .....
> > 
> > I'd suggest to move the common parts of the three ice1712 drivers into
> > separate files.  You could make the interface of those files similar to
> > ASoC codec drivers to make later porting easier.
> 
> How about a solution similar to AKM codecs in i2c/other? Several ice1724
> cards make use of those modules, easy to support and re-use. IMO cleaner
> approach than duplicating ICE1724 to the ASoC framework.

ASoC would be rather a "cleaner" approach, but moving the common code
into i2c/other would be a "safer" approach.  It can be done without
shifting the whole infrastructure of ice17xx and oxygen drivers,
indeed.


thanks,

Takashi

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

* Re: Triple implementation of WM8766 and quadruple WM8776!
  2012-03-13  9:58     ` Takashi Iwai
@ 2012-03-13 10:05       ` Pavel Hofman
  0 siblings, 0 replies; 7+ messages in thread
From: Pavel Hofman @ 2012-03-13 10:05 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Clemens Ladisch, alsa-devel, Ondrej Zary

Dne 13.3.2012 10:58, Takashi Iwai napsal(a):
>> .....
>>>
>>> I'd suggest to move the common parts of the three ice1712 drivers into
>>> separate files.  You could make the interface of those files similar to
>>> ASoC codec drivers to make later porting easier.
>>
>> How about a solution similar to AKM codecs in i2c/other? Several ice1724
>> cards make use of those modules, easy to support and re-use. IMO cleaner
>> approach than duplicating ICE1724 to the ASoC framework.
> 
> ASoC would be rather a "cleaner" approach, but moving the common code
> into i2c/other would be a "safer" approach.  It can be done without
> shifting the whole infrastructure of ice17xx and oxygen drivers,
> indeed.

That is very true. I am afraid we do not have all the cards physically
available to test a major overhaul of ice17xx.

Pavel.

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

* Re: Triple implementation of WM8766 and quadruple WM8776!
  2012-03-13  9:53   ` Pavel Hofman
  2012-03-13  9:58     ` Takashi Iwai
@ 2012-03-13 21:31     ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2012-03-13 21:31 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: Ondrej Zary, alsa-devel, Clemens Ladisch

On Tue, Mar 13, 2012 at 10:53:09AM +0100, Pavel Hofman wrote:

> How about a solution similar to AKM codecs in i2c/other? Several ice1724
> cards make use of those modules, easy to support and re-use. IMO cleaner
> approach than duplicating ICE1724 to the ASoC framework.

Those drivers should also be using ASoC - they're there only because
they predate having a framework for this stuff.  As Clemens said we
shouldn't be duplicating the ICE1724 code, we should be moving it.

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

end of thread, other threads:[~2012-03-13 21:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 21:40 Triple implementation of WM8766 and quadruple WM8776! Ondrej Zary
2012-03-13  9:46 ` [alsa-devel] " Clemens Ladisch
2012-03-13  9:46   ` Clemens Ladisch
2012-03-13  9:53   ` Pavel Hofman
2012-03-13  9:58     ` Takashi Iwai
2012-03-13 10:05       ` Pavel Hofman
2012-03-13 21:31     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.