All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [RFC][PATCH 4/4] Add support for Marvell 88w8618 / MusicPal
Date: Sat, 19 Apr 2008 21:01:55 +0200	[thread overview]
Message-ID: <480A41A3.1000908@web.de> (raw)
In-Reply-To: <fb249edb0804181143x35d73676u489535dcad391a82@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4069 bytes --]

andrzej zaborowski wrote:
> On 18/04/2008, Jan Kiszka <jan.kiszka@web.de> wrote:
>>  Andrzej, as you have written the wm8750, do you already know where 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 paths
> (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 (the
> 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 manually.
>  (VirtualBox has them implemented iirc)  So yes, maybe it makes sense
> to multiply the samples for the moment and use only LOUTnVOL /
> ROUTnVOL values as these are used by the guests we're interested in.

Done, and it finally works. One of the two quirks I found in wm8750 made
the switch a bit hairy. Patches will follow.

> 
>>
>>  >>>   - 128×64 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, surely 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 memory
>>  > beyond it (here for the pflash in R/W mode).
> 
> Yes, I had not looked at how ram_size was used in the musicpal board
> initialisation, sorry.
> 
>>
>> OK, I see what you mean after looking at your N800 patches: You apply 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. And it is
>>  far from being intuitive as well.
> 
> Yes, although you allow the user to set also a smaller RAM than what
> 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 into 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 prevents 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 the
> memory size there is on board - on machines like Spitz there's no way)

IIRC, embedded boards let the boot loader "detect" this. I see valid
scenarios where one wants to play with different sizes and may therefore
patch U-Boot - or load the kernel directly which should make QEMU set
the related ATAG field appropriately, no?

> 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 only
describe the main RAM size, not any additionally by QEMU required memory
for establishing fixed SRAM or even for backing up flash devices. That's
at least what I would expect from this switch and what the documentation
suggests as well so far.

Thus, back to square #1: Can't we move qemu_vmalloc into the
machine-specific init handlers?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

  reply	other threads:[~2008-04-19 19:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13 10:11 [Qemu-devel] [RFC][PATCH 4/4] Add support for Marvell 88w8618 / MusicPal Jan Kiszka
2008-04-13 20:52 ` malc
2008-04-14  6:59   ` [Qemu-devel] " Jan Kiszka
2008-04-14 13:12     ` Stuart Brady
2008-04-14 16:21       ` Jan Kiszka
2008-04-14 16:49     ` malc
2008-04-14 17:47       ` Jan Kiszka
2008-04-15 17:38         ` malc
2008-04-15 21:03           ` Jan Kiszka
2008-04-16 18:40             ` malc
2008-04-17 19:06               ` Jan Kiszka
2008-04-14 19:21 ` Jan Kiszka
2008-04-14 21:34   ` Jan Kiszka
2008-04-17  0:24 ` [Qemu-devel] " andrzej zaborowski
2008-04-17  0:46   ` andrzej zaborowski
2008-04-17 19:06   ` [Qemu-devel] " Jan Kiszka
2008-04-18 18:12     ` Jan Kiszka
2008-04-18 18:43       ` andrzej zaborowski
2008-04-19 19:01         ` Jan Kiszka [this message]
2008-04-20  4:11           ` andrzej zaborowski
2008-04-20 15:52             ` Jan Kiszka
2008-04-20 17:38               ` andrzej zaborowski
2008-04-20 16:32 ` [Qemu-devel] [PATCH] " Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=480A41A3.1000908@web.de \
    --to=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.