[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [alsa-devel] Triple implementation of WM8766 and quadruple WM8776!
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.


 \ /
  Last update: 2012-03-13 10:45    [W:0.054 / U:4.928 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site