From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MV9WZ-0000kz-Dr for qemu-devel@nongnu.org; Sun, 26 Jul 2009 15:36:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MV9WU-0000j3-2c for qemu-devel@nongnu.org; Sun, 26 Jul 2009 15:36:47 -0400 Received: from [199.232.76.173] (port=57617 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV9WT-0000j0-Uv for qemu-devel@nongnu.org; Sun, 26 Jul 2009 15:36:41 -0400 Received: from mail-yw0-f185.google.com ([209.85.211.185]:39057) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MV9WT-0002oG-F1 for qemu-devel@nongnu.org; Sun, 26 Jul 2009 15:36:41 -0400 Received: by ywh15 with SMTP id 15so368743ywh.4 for ; Sun, 26 Jul 2009 12:36:40 -0700 (PDT) Message-ID: <4A6CB047.3030509@codemonkey.ws> Date: Sun, 26 Jul 2009 14:36:39 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define References: <4A6C5903.4000708@codemonkey.ws> <4A6C6B9C.2080909@redhat.com> <4A6C71A2.70904@web.de> In-Reply-To: <4A6C71A2.70904@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: aliguori@us.ibm.com, Juan Quintela , Avi Kivity , qemu-devel@nongnu.org Jan Kiszka wrote: > Avi Kivity wrote: > >> On 07/26/2009 04:41 PM, Juan Quintela wrote: >> >>> 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. >>> >>> >> You could pass a goodness value to the registration function, reflecting >> what we think the best driver is. Then at runtime select the best >> driver that is supported on the system. >> >> > > I think the easiest way is to forward the sorted driver list as string > to the audio layer and let it be processed there. Given such an > extension, we could also allow passing a list of drivers via QEMU_AUDIO_DRV. > Sure. Just make audio_init() take an array of strings, have it try and initialize each in that order, then initialize the remaining ones. I'd say get rid of the compile time ordering entirely. This is the sort of thing that begs for a global configuration file. Regards, Anthony Liguori