From: Takashi Iwai Subject: Re: Triple implementation of WM8766 and quadruple WM8776! Date: Tue, 13 Mar 2012 10:58:15 +0100 Message-ID: References: <201203122241.12234.linux@rainbow-software.org> <4F5F1776.4020904@ladisch.de> <4F5F1905.7040609@ivitera.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id BC12D24525 for ; Tue, 13 Mar 2012 10:58:17 +0100 (CET) In-Reply-To: <4F5F1905.7040609@ivitera.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Pavel Hofman Cc: Ondrej Zary , alsa-devel@alsa-project.org, Clemens Ladisch List-Id: alsa-devel@alsa-project.org 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