From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753296Ab1GWTmx (ORCPT ); Sat, 23 Jul 2011 15:42:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45602 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508Ab1GWTmr (ORCPT ); Sat, 23 Jul 2011 15:42:47 -0400 Date: Sat, 23 Jul 2011 21:42:43 +0200 Message-ID: From: Takashi Iwai To: Linus Torvalds Cc: Mark Brown , Liam Girdwood , linux-kernel@vger.kernel.org Subject: Re: [GIT PULL] sound updates for 3.1-rc1 In-Reply-To: References: User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Sat, 23 Jul 2011 11:06:14 -0700, Linus Torvalds wrote: > > On Sat, Jul 23, 2011 at 9:32 AM, Takashi Iwai wrote: > > > > As you can see below, the diffstat shows awfully huge numbers.  It's > > mainly the reworks of two HD-audio drivers after I finally had some > > spare time and a gut to face them.  Most of LOCs there are due to code > > split, but also a significant amount of code reduction has been done, > > too.  In addition, as usual, many ASoC fixes/updates have been applied > > in this cycle, too. > > So wrt that whole HDA thing, can somebody explain what the difference > between a "patch" and a "quirk" is? It looks like the "quirks" are > smaller patches (they all seem to be about realtek, at least > currently). The "patch" came from the initial design to allow the non-generic codec parsers. It ended up with the codec-driver of each codec chip. Thus patch_*.c corresponds to each HD-audio "codec" driver (while hda_intel.c is HD-audio "controller" driver). In the development of Realtek and other codec drivers, we faced the problem of broken BIOSen and complex tree structure. As a workaround, the "quirk" was introduced -- it's a kind of static configuration without parsing the whole tree. (This is called also as "models", since it can be selected via model module option.) Quirks have grown up quickly in the early time because the parser itself was not smart enough, and there have been numerous broken setups. Now, I finally tried to do radical diet. Together with the improvement of the parser code to handle all tree graphs, the quirks are stripped out of the main parser code. These are alc*_quirks.c. The remaining patch_realtek.c contains the pure parser code with a few other minimal static configurations. My further plan is to convert most of quirks into the minimal static configurations that are just required for the tree-parser. Thus, alc*_quirks.c will be eliminated in near future again, hopefully in a couple of kernel releases. > And does it really make sense to use #include to get the *.c files? > Wouldn't it be much nicer to have a "realtek" subdirectory and link > those together. That would work, certainly yes. As said, this was the first step toward a bigger clean-up. So I didn't want to change the quirk codes so much but just cut them off from the main code. If you prefer that way, I can move and change the code before the merge window closes. > I don't care deeply, but the whole HDA source organization is getting > pretty darn ugly, I have to say. Yeah, it's awfully messy and hence I'm working on it. This is still in the early ugly stage during the beauty surgery :) Takashi