From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JmIGr-0005Li-QH for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:46:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JmIGp-0005LW-D7 for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:46:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JmIGp-0005LT-7S for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:46:35 -0400 Received: from ug-out-1314.google.com ([66.249.92.169]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JmIGo-0007Vy-Ps for qemu-devel@nongnu.org; Wed, 16 Apr 2008 20:46:34 -0400 Received: by ug-out-1314.google.com with SMTP id m2so1061302uge.4 for ; Wed, 16 Apr 2008 17:46:28 -0700 (PDT) Message-ID: Date: Thu, 17 Apr 2008 02:46:28 +0200 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [RFC][PATCH 4/4] Add support for Marvell 88w8618 / MusicPal In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4801DC59.1010403@web.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 17/04/2008, andrzej zaborowski wrote: > On 13/04/2008, Jan Kiszka wrote: > > This is the board emulation for Freecom's MusicPal, featuring > > - rudimentary PIT and PIC > > - up to 2 UARTs > > - 88W8xx8 Ethernet controller > > - 88W8618 audio controller > > - Wolfson WM8750 mixer chip (volume control and mute only) > > Are you sure that hw/wm8750.c is not reusable? It's probably better > to extend it with volume control, and audio data transmission through > i2c, instead of having two implementations in QEMU. > > Regarding volume control, since there are only 0x7f possible values > it's nicer to use a const table than pull in math.h. Actually I > wouldn't worry about that at all because the layout of volume levels > on the host is not guaranteed to be linear (I think?), it may very > well be already exponential. For example the Linux WM8750 driver > doesn't do the reverse transformation which would mean that on a host > whose ALSA output device is a WM8750, the Qemu vm would have a wrong > volume scale. Ah, we're multiplying the samples, rather than setting volume on host. Please ignore the above comment, but it would still be good to avoid pow() (especially if return value is invariant across the loop and perhaps across many buffer fills). -- Please do not print this email unless absolutely necessary. Spread environmental awareness.