From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MV3zU-0006U7-Ut for qemu-devel@nongnu.org; Sun, 26 Jul 2009 09:42:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MV3zP-0006JU-J0 for qemu-devel@nongnu.org; Sun, 26 Jul 2009 09:42:16 -0400 Received: from [199.232.76.173] (port=54721 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV3zP-0006J8-Dq for qemu-devel@nongnu.org; Sun, 26 Jul 2009 09:42:11 -0400 Received: from mx2.redhat.com ([66.187.237.31]:52571) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MV3zO-0007JL-Uy for qemu-devel@nongnu.org; Sun, 26 Jul 2009 09:42:11 -0400 In-Reply-To: <4A6C5903.4000708@codemonkey.ws> (Anthony Liguori's message of "Sun\, 26 Jul 2009 08\:24\:19 -0500") References: <4A6C5903.4000708@codemonkey.ws> From: Juan Quintela Date: Sun, 26 Jul 2009 15:41:49 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Anthony Liguori wrote: > malc wrote: >> On Fri, 24 Jul 2009, Juan Quintela wrote: >> >> >>> Signed-off-by: Juan Quintela >>> --- >>> audio/audio.c | 25 ++++++++++++++++++++++++- >>> configure | 3 --- >>> 2 files changed, 24 insertions(+), 4 deletions(-) >>> >> >> That's how it used to be before, i see no reason of going back to this >> style. >> > > Right. The way to get rid of AUDIO_DRIVERS is to convert drvtab[] to > be a list with an appropriate audio driver registration function. > > Each .c file should have an audio_init() method that then registers > the audio_driver structure. Individual audio drivers can be > added/removed by simply building or not building the file. > > Just like how the block infrastructure works. > > Regards, > > Anthony Liguori Not enough. See malc hint (g show 0c58ac1c7) The order in audio_drivers is important, that means you can have a different default sound driver. After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS. Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial. Later, Juan.