From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JnbqB-0001ej-Ry for qemu-devel@nongnu.org; Sun, 20 Apr 2008 11:52:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JnbqB-0001eK-1C for qemu-devel@nongnu.org; Sun, 20 Apr 2008 11:52:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnbqA-0001eE-S3 for qemu-devel@nongnu.org; Sun, 20 Apr 2008 11:52:30 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JnbqA-0003lF-Qv for qemu-devel@nongnu.org; Sun, 20 Apr 2008 11:52:31 -0400 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate02.web.de (Postfix) with ESMTP id 51C3BD97EB20 for ; Sun, 20 Apr 2008 17:52:27 +0200 (CEST) Received: from [88.64.9.155] (helo=[192.168.1.198]) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1Jnbq6-0000XS-00 for qemu-devel@nongnu.org; Sun, 20 Apr 2008 17:52:27 +0200 Message-ID: <480B66B4.4060207@web.de> Date: Sun, 20 Apr 2008 17:52:20 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RFC][PATCH 4/4] Add support for Marvell 88w8618 / MusicPal References: <4801DC59.1010403@web.de> <48079FA6.3080104@web.de> <4808E49D.6020107@web.de> <480A41A3.1000908@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7FFD7022DC4EAB36743D760D" Sender: jan.kiszka@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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7FFD7022DC4EAB36743D760D Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable andrzej zaborowski wrote: > On 19/04/2008, Jan Kiszka wrote: >> andrzej zaborowski wrote: >> > On 18/04/2008, Jan Kiszka wrote: >> >> Andrzej, as you have written the wm8750, do you already know wher= e which >> >> volume level would have to be applied (open-coded or via some >> >> AUD_set_volume)? I'm currently only using LOUT2VOL, and I'm a bit= lazy >> >> to study the datasheet /wrt all the mixer details. >> > >> > My idea was to open >> > http://www.wolfsonmicro.com/uploads/documents/en/WM8750.pdf and on = the >> > first page every Wolfson datasheet has its diagram of all audio pat= hs >> > (of which there are always too many) and then trace with my finger = the >> > path between the source (the I2C or I2S interfaces) and the sink (t= he >> > analog output), and then multiply all the volume values that are >> > applied there (both analog and digital) and pass that to host mixer= >> > through some functions in audio/ for the given SWVoice - but we don= 't >> > have any such functions and I'm ok with using the host mixer manual= ly. >> > (VirtualBox has them implemented iirc) So yes, maybe it makes sen= se >> > to multiply the samples for the moment and use only LOUTnVOL / >> > ROUTnVOL values as these are used by the guests we're interested in= =2E >> >> >> Done, and it finally works. One of the two quirks I found in wm8750 ma= de >> the switch a bit hairy. Patches will follow. >=20 > Thanks. I pushed the patch with fixes. Regarding the wm8750_fini > patch, I'll #if 0 it because it's possible that a board will have this > chip on something hotpluggable and will need to create and destroy it > various times and it's easy to miss something in the clean-up. > Regarding the volume patch, I'll make a look-up table at one point, Don't understand yet why (are you afraid of pow, libm, or float in general?), but if it helps to get things merged... ;) > and then merge. Also, if we have 16-bit data and 7-bit volume scale > maybe we're fine with scalling only the most-significant-byte and Hmm, wasn't endianness about finding out which byte is most-significant and which not? :-> > avoiding endianness headaches (or maybe not). Nevertheless the > MusicPal emulator should be bootable without that. >=20 >> >> > >> >> >> >> >>> - 128=C3=9764 display with brightness control >> >> >>> - all input buttons >> >> >>> >> >> >>> Using up to 32 MB flash, I hit a limit /wrt phys_ram_size. I= worked >> >> >>> around this for now by extending MAX_BIOS_SIZE to 32 MB, sur= ely not a >> >> >>> nice solution. >> >> >> You can use -m 150 or similar. >> >> >> >> >> >> Please also format the code similarly to rest of Qemu. >> >> > >> >> > That would just increase ram_size, thus won't help as I need me= mory >> >> > beyond it (here for the pflash in R/W mode). >> > >> > Yes, I had not looked at how ram_size was used in the musicpal boar= d >> > initialisation, sorry. >> > >> >> >> >> OK, I see what you mean after looking at your N800 patches: You ap= ply a >> >> fixed RAM size, leaving the rest of what the user provided via -m= to >> >> SRAM and flash. Not optimal IMHO, you may sometimes also want to = play >> >> with the RAM size even if the real devices has a fixed amount. An= d it is >> >> far from being intuitive as well. >> > >> > Yes, although you allow the user to set also a smaller RAM than wha= t >> > the virtual machine expects. >> >> >> That's indeed something the machine should take of (if there are such >> hard limits). >> >> >> > >> >> The only true solution I see right now is moving qemu_vmalloc int= o the >> >> machine initialization code. Is there anything between current >> >> qemu_vmalloc and machine->init that relies on phys_ram_base being= valid >> >> (and which can't be moved after the machine init) and thus preven= ts this? >> > >> > I had a different idea: add a field ram_constraint in struct >> > QEMUMachine, which would hold the amount of RAM the machine always >> > needs (e.g. bios and video RAM), and the low bit could hold a flag >> > RAM_SIZE_FIXED for machines that have only such RAM (basically the >> > criteria should be whether it's possible for the guest to detect th= e >> > memory size there is on board - on machines like Spitz there's no w= ay) >> >> >> IIRC, embedded boards let the boot loader "detect" this. I see valid >> scenarios where one wants to play with different sizes and may theref= ore >> patch U-Boot - or load the kernel directly which should make QEMU set= >> the related ATAG field appropriately, no? >=20 > Yes, in case of a standard firmware like Linux or U-boot - but we > probably don't need to provide options for everything one may want to > play with unless it's a valid hardware configuration (like in the PC > case where you can add and take away RAM sticks), at some point the > user needs to edit the source either way. >=20 > Anyway almost half of the boards in qemu ignored ram_size until now > and risked the provided size being too low and segfaulting, so with > the patch I sent in another mail at least there's a check, and the > check is only done once for all boards so it can be removed from the > few boards that did it. >=20 >> >> > and for such machines the -m parameter would be invalid. I'll try = to >> > come up with a patch. >> >> >> I originally had the same idea but I dropped it because it would still= >> overload -m with semantics that don't belong there. IMHO -m should on= ly >> describe the main RAM size, not any additionally by QEMU required mem= ory >> for establishing fixed SRAM or even for backing up flash devices. Tha= t's >> at least what I would expect from this switch and what the documentat= ion >> suggests as well so far. >=20 > This property is not changed by the patch (I hope). Yes, it restores the original semantic, at least as long as RAMSIZE_FIXED is not set. That case is still a bit suboptimal as you have to provide pessimistic values, e.g. the maximum flash size that can be used. But I can live with it I guess. Jan --------------enig7FFD7022DC4EAB36743D760D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIC2a6niDOoMHTA+kRAjBEAJ0XJxcxyV6fBtQ421ab1S2XCMZCOACcCo6O 38JkQIMlyXU6IdiZkfg0ajc= =hXzJ -----END PGP SIGNATURE----- --------------enig7FFD7022DC4EAB36743D760D--