<?xml version="1.0" ?>
<kc>

<title>Wine Traffic</title>

<author contact="http://www.theshell.com/~vinn">Brian Vincent</author>
<issue num="280" date="24 Jun 2005 00:00:00 -0800" />
<intro> <p>This is the 280th issue of the Wine Weekly News publication.
Its main goal is to steal pens off your desk. It also serves to inform you of what's going on around Wine. Wine is an open source implementation of the Windows API on top of X and Unix.  Think of it as a Windows compatibility layer.  Wine does not require Microsoft Windows, as it is a completely alternative implementation consisting of 100% Microsoft-free code, but it can optionally use native system DLLs if they are available.   You can find more info at <a href="http://www.winehq.org">www.winehq.org</a></p> </intro>
<stats posts="201" size="705" contrib="81" multiples="36" lastweek="38">

<person posts="20" size="54" who="Alexandre Julliard" />
<person posts="11" size="33" who="Mike Hearn" />
<person posts="10" size="40" who="Martin Fuchs" />
<person posts="10" size="24" who="Andreas Mohr" />
<person posts="8" size="27" who="Raphael" />
<person posts="8" size="25" who="Robert Shearman" />
<person posts="7" size="24" who="Michael Jung" />
<person posts="7" size="21" who="James Liggett" />
<person posts="6" size="36" who="Oliver Stieber" />
<person posts="5" size="21" who="Brad DeMorrow" />
<person posts="5" size="17" who="Huw D M Davies" />
<person posts="4" size="11" who="cdr" />
<person posts="4" size="11" who="Dimi Paun" />
<person posts="4" size="10" who="Mike McCormack" />
<person posts="3" size="21" who="Stefan D&#246;singer" />
<person posts="3" size="11" who="Walt Ogburn" />
<person posts="3" size="7" who="Troy Rollo" />
<person posts="2" size="21" who="Tobias Burnus" />
<person posts="2" size="7" who="Ralf Reiterer" />
<person posts="2" size="7" who="Brad" />
<person posts="2" size="7" who="Hans Kristian Rosbach" />
<person posts="2" size="6" who="Brian Vincent" />
<person posts="2" size="6" who="Maarten Lankhorst" />
<person posts="2" size="6" who="Eric Frias" />
<person posts="2" size="6" who="Jacek Caban" />
<person posts="2" size="6" who="Dimi Paun" />
<person posts="2" size="6" who="Hiji" />
<person posts="2" size="5" who="Ove Kaaven" />
<person posts="2" size="5" who="Evil" />
<person posts="2" size="5" who="Vitaliy Margolen" />
<person posts="2" size="5" who="Felix Nawothnig" />
<person posts="2" size="5" who="Saulius Krasuckas" />
<person posts="2" size="5" who="Marcus Meissner" />
<person posts="2" size="4" who="Vijay Kiran Kamuju" />
<person posts="2" size="4" who="David Laight" />
<person posts="2" size="4" who="Paul Vriens" />
<person posts="1" size="13" who="(cyrix12)" />
<person posts="1" size="13" who="Martin Fuchs" />
<person posts="1" size="7" who="Mark Knecht" />
<person posts="1" size="5" who="Dustin Navea" />
<person posts="1" size="5" who="Stefan Huehner" />
<person posts="1" size="5" who="Chris Morgan" />
<person posts="1" size="4" who="Ahmed Abdel Aal" />
<person posts="1" size="4" who="Christoph" />
<person posts="1" size="4" who="Christoph Rudorff" />
<person posts="1" size="4" who="David Lee Lambert" />
<person posts="1" size="4" who="Tony Lambregts" />
<person posts="1" size="4" who="=?ISO-8859-1?Q?Alex_Villac=ED=ADs_Lasso?=" />
<person posts="1" size="3" who="Marcus Meissner" />
<person posts="1" size="3" who="J. Grant" />
<person posts="1" size="3" who="Francois Gouget" />
<person posts="1" size="3" who="Jelmer Vernooij" />
<person posts="1" size="3" who="Shachar Shemesh" />
<person posts="1" size="3" who="zhilla" />
<person posts="1" size="3" who="Maxime Bellenge" />
<person posts="1" size="3" who="Dmitry Timoshkov" />
<person posts="1" size="3" who="Michael =?iso-8859-1?q?B=FCttner?=" />
<person posts="1" size="3" who="Jonathan Ernst" />
<person posts="1" size="3" who="Aric Cyr" />
<person posts="1" size="3" who="Michael Stefaniuc" />
<person posts="1" size="3" who="Kenneth Porter" />
<person posts="1" size="3" who="James Hawkins" />
<person posts="1" size="3" who="Brian Gunlogson" />
<person posts="1" size="3" who="Frank Richter" />
<person posts="1" size="3" who="Thomas Weidenmueller" />
<person posts="1" size="3" who="Jesse Allen" />
<person posts="1" size="3" who="Matthew Frederico" />
<person posts="1" size="2" who="Anssi Hannula" />
<person posts="1" size="2" who="Rob Shearman" />
<person posts="1" size="2" who="Scott Ritchie" />
<person posts="1" size="2" who="Paul Vriens" />
<person posts="1" size="2" who="Krzysztof Foltman" />
<person posts="1" size="2" who="Robert Lunnon" />
<person posts="1" size="2" who="Joseph Garvin" />
<person posts="1" size="2" who="Marcelo Duarte" />
<person posts="1" size="2" who="Glen Kaukola" />
<person posts="1" size="2" who="Peter Quiring" />
<person posts="1" size="2" who="Stefan D&#246;singer" />
<person posts="1" size="2" who="Vitaly Lipatov" />
<person posts="1" size="2" who="Lionel Ulmer" />

</stats>
<section 
	title="News: StartCom Linux"
	subject="News"
	archive="http://www.startcom.org/index.php?lang=en&amp;app=23"
	posts="1"
	startdate="18 Jun 2005 00:00:00 -0800"
	enddate="24 Jun 2005 00:00:00 -0800"
>
<topic>News</topic>
<mention>News</mention>

<p>Have you ever wished you had a Red Hat based distribution that comes
bundled with Wine?  
<a href="http://www.startcom.org/index.php?lang=en&amp;app=23">StartCom
Linux</a> has a MultiMedia Edition that includes Wine.  Version 3.0.3
just had an updated version of Wine released and a new version based
on StartCom Enterprise 4.0.0 is in the works.  They seem to have put 
some thought into creating a sharp looking and usable desktop system.
</p>
</section>
<section 
	title="Binary Registry Ideas"
	subject="Wine's Registry Format"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/06/0557.html"
	posts="22"
	startdate="16 Jun 2005 00:00:00 -0800"
	enddate="21 Jun 2005 00:00:00 -0800"
>
<topic>Configuration</topic>
<mention>Eric Kohl</mention>
<mention>Shachar Shemesh</mention>
<mention>ReactOS</mention>
<mention>Rob Shearman</mention>

<p>Wine's registry implementation has a lot of pros and cons.  A big
advantage seen by many in the Unix community is the text-based format.
Unlike Windows, you can simply open Wine's registry files in your
favorite text editor (vim if you're me, or emacs if you're Alexandre).  
Bug <a href="http://bugs.winehq.org/show_bug.cgi?id=422">#422</a> 
describes one of the drawbacks to this approach:</p>
<quote who="Francois Gouget"><p>
Currently Wine loads the complete registry into memory at startup. This is
relatively ok when the registry is small such as in fake_windows configurations,
but when importing the registry fro a Windows partition this can result in the
wineserver allocating more than 30MB. This slows down startup times very
significantly and wastes memory even if most of it is going to be swapped out.
</p><p>
One of the reasons why Wine puts all the registry into memory on startup is that
the current registry file format does not lend itself well to random accesses
(especially writes). But there is no fundamental reason why Wine needs to read
all the registry on startup. Hence this proposal to:
<ul>
 <li> change the registry file format so that Wine can easily make random accesses.
A 'database' format may be appropriate here, maybe based on the Berkeley
database Library (libdb2/libdb3) or the GNU dbm library (libgbm1, but check
license issues).</li>
 <li> put in place a mechanism to update these files from the Windows registry
files when appropriate (it seems impractical to access the Windows files
directly)</li>
 <li> modify the registry routines to retrieve only the data required by the
application and cache it in memory</li></ul>

</p></quote>

<p>Brad DeMorrow began a discussion this week about tackling that
project:</p>
<quote who="Brad DeMorrow"><p>

I've looked into using a Balanced Tree DB from BerkelyDB as a quicker
interface to the registry.  I think it would be a good solution, but
the question is whether or not you want the overhead of another library
added to wine. That's why I'm writing here actually - I need to know
if it's ok to add this dependancy to wine, or if I should find a different 
approach.
</p><p>

I know this would cause some chaos in the community - so If this is
something that everyone agrees should be done, I'll write a small utility
to convert the current ascii registry files into the new format.
</p><p>

Let me know what you think

</p></quote>

<p>Alexandre replied first,
<quote who="Alexandre Julliard">
Actually the current method is probably the fastest for everything
except the initial read. Admittedly it's not very elegant, but it's
simple and allows us to store everything in text format. So I'm not at
all convinced that using a real database would be worth the trouble.</quote>
</p>

<p>Brad went into a little more detail and explained more advantages of
changing it:</p>

<quote who="Brad DeMorrow"><p>
The only reason that the current method is fast is because we're loading
the entire registry into memory.  As stated in Bugzilla, this is fine for
small registries, but the author of the bug has noted wineserver allocated
up to 30MB when wine initiates JUST for the registry!

</p><p>
I'm not saying we should abandon the way we edit our registry - because it
is very useful to be able to edit it manually with a text editor. . . 
HOWEVER, I believe we should have a more elegant way that the API
accesses the registry.   Using a small helper app to sync our
plain-text registry files into a db format would let us maintain a
human-readable format of our registry, while also reducing the overhead
required by the current registry format.</p><p>
Using BerkeleyDB to access the registry would provide the kind of
random-access that we need for such a large amount of information - It
would also provide us with a quicker and easier way to search through the
registry - so we could finally implement the Find feature in wine's
regedit without much effort ( Not that it couldn't be done as is, but
things would definitely be easier ).
</p><p>
I'm really not trying to push something that wouldn't help wine if not
now, in the near future.   A lot of people don't have fast machines
with an abundance of memory.  30MB can be a lot of memory for someone
with 128MB of RAM. 
</p></quote>

<p>Several ideas were brought up concerning restructuring the registry,
including using XML.  Martin Fuchs felt if there was going to be a move
to a binary format, then it might be wise to use one that already exists,
<quote who="Martin Fuchs">
The best solution would be to use native Windows
registry format. This way you could use real Windows registry files,
and can read and update registry piecewise. It's organized like a
little file system - or database if you want to see it this way. It's
not documented. But you could have a look at the ReactOS
implementation, which claimes to be compatible to NT4.
</quote></p>

<p>James Liggett looked into it and reported,
<quote who="James Liggett">
 I have the latest release of ReactOS running on QEMU on my
box, so I checked it out. Basically, they're using the same regedit
program from Wine, missing find command and all (Which I too feel is a
pain in the neck). I looked at the config stuff, and I found what looked
like some binary database files for each of the main registry sections.
Unfortunately, there's no documentation at all on any of this on their
website. If we decide to go this route, we may be in for a hell of a lot
of work. But, I do agree with all of your points. I think the current
system could use some improvement, especially in the area of searching.
Let me know what you think of all this.</quote></p>

<p>Shachar Shemesh expanded on the idea of binary compatibility:</p>
<quote who="Shachar"><p>

How about an application that carries a binary registry hive around, and 
uses "LoadHive" to merge it (temporarily) into the registry?
</p><p>
How about deploying Wine in such a way that it uses the existing user 
profile, user.dat and all? User.dat is a registry file, that goes 
through load hive.
</p><p>
The way I see the ultimate outcome, Wine should have "Registry 
providers". These would allow it to use several different registry back 
ends. The default one would probably be the one used today, but this way 
we could plug in an SQL back end if needed, as well as a Windows 
compatible one, if needed.

</p></quote>

<p>Brad then went in search of ReactOS' Eric Kohl to ask about the
ROS registry implementation.  
That was pretty much the end of the discussion.  It wasn't clear
if a binary registry was simply a solution in search of a problem, or
if there are real performance concerns that need addressing.  Alexandre
doesn't seem to be in favor of the idea, though some of the ideas 
regarding separate applications do sound interesting.  </p>

<p>While we were on the topic of the registry, I asked if it would just
be possible to add support for importing Windows' .reg files.  Rob
Shearman felt it would be easy enough to do since the only thing 
really broken with it right now is the fact NT's Unicode format can't
be read in (making .reg files from XP useless.)  </p>

</section>
<section 
	title="Exposing the Unix Filesystem"
	subject="winecfg's registry convience functions"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/06/0613.html"
	posts="8"
	startdate="20 Jun 2005 00:00:00 -0800"
	enddate="23 Jun 2005 00:00:00 -0800"
>
<topic>Filesystems</topic>
<mention>Microsoft</mention>
<mention>cvs</mention>

<p>
Michael Jung, who created the new Unix filesystem shell extension,
wanted to know how to go about exposing that to Wine:</p>
<quote who="Michael Jung"><p>
I would like to add a checkbox control ("Show host filesystem") to winecfg to 
allow the user to easily (un-)register the unixfs shell namespace extension. 
So winecfg would have to query and create/delete the 
"HKLM\Software\Microsoft\CurrentVersion\Explorer\MyComputer\Namespace\{UNIXFS-CLSID}"
key. There are helper functions in winecfg.c to cache registry values for 
later application, iff the user clicks "Apply" or "Ok". However, those seem 
to work only for keys rooted at the config key "HKCU\Software\Wine".
</p><p>
My question is: Am I doomed to implement the caching on my own for this key, 
should I generalize the helper functions, or do you think this configuration 
option should'nt be in winecfg at all?</p></quote>

<p>Mike Hearn wondered when a user <i>wouldn't</i> want that to be
set up.  Michael described why it should be configurable:</p>
<quote who="Michal Jung"><p>
If you register the extension, you will have the drive letters as well as the 
unix filesystem, which is somewhat redundant. Thus I thought we might better 
not register it by default and give the user the choice. 
</p><p>
In my opinion, the best way would be to have an option under [shell32] which 
can be set to show the dos drives, the unix filesystem or both. This could be 
set globally or in AppDefaults (and since it would be under HKCU per user). 
This would mean some unixfs specific code in the MyComputer shell folder, but 
I guess there's no way around this, if we want to be able to hide the drive 
letters.</p></quote>

<p>Mike had an idea about how all of it could be exposed to the user:</p>
<quote who="Mike Hearn"><p>
Yeah, I think that would work better for the user. I'm not sure it should
be a preference just to enable/disable unixfs as is, but if you can set it
as an appdefault and hide the drive letters that'd be good.
</p><p>
One thing we might want to look into is integrating with the GNOME/GTK+
file roots. In the new file picker, it hides the UNIX by default and you
have multiple roots like "DVD Drive", "Home", "Desktop", "Apps on
SomeServer" and so on. I think that's a much more user-friendly way of
doing it than exposing things like /mnt, /usr/, /etc to the user. That
would be an additional unixfs feature I guess.</p></quote>

<p>Michael had an idea of how to fit that in:</p>
<quote who="Michael Jung"><p>
I think those should be handled by a MyDocuments shell folder, which should 
work with both shfldr_fs and shfldr_unixfs, whatever the user selected. So we 
would have multiple instances of the MyDocuments shell folder with different 
names (like Home, DVD Drive, ...) and different target directories 
(like /home/foobar or /cdrom), configured with winecfg (or perhaps read from 
the gnome config).
</p><p>

I found the website 
<a href="http://www.virtualplastic.net/html/ui_shell.html">http://www.virtualplastic.net/html/ui_shell.html</a> , which 
describes how to create virtual shell folders that link to locations in the 
filesystem. And then there's the freeware tool "Shell Object Editor" 
<a href="http://www.tropictech.de/modules/wfdownloads/viewcat.php?cid=1">http://www.tropictech.de/modules/wfdownloads/viewcat.php?cid=1</a>, which does 
this stuff programmatically. I guess if we implement the necessary behaviour 
in wine, that would be all we need? (And perhaps some code in winecfg to read 
the gnome configuration and map it to virtual shell folders.)
</p> </quote>
<p>Mike went and looked into how GTK+ gets those locations for its file
picker and found the code responsible:</p>
<quote who="Mike Hearn"><p>
The relevant function is here:
<ul>
<a href="http://cvs.gnome.org/viewcvs/libgnomeui/file-chooser/gtkfilesystemgnomevfs.c?rev=1.65&amp;view=markup">
http://cvs.gnome.org/viewcvs/libgnomeui/file-chooser/gtkfilesystemgnomevfs.c?rev=1.65&amp;view=markup</a></ul></p><p>

It's gtk_file_system_gnome_vfs_list_volumes. Doesn't look too hard to
dlopen libgnomevfs and fetch the right list. Harder part is integrating
that with the shell32 VFS and getting things like icons right etc.</p></quote>

</section>
<section 
	title="Finding and Using Fonts"
	subject="Re: Change Name of Wine Marlett Font"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/06/0611.html"
	posts="15"
	startdate="20 Jun 2005 00:00:00 -0800"
	enddate="21 Jun 2005 00:00:00 -0800"
>
<topic>Fonts</topic>
<mention>Rob Shearman</mention>

<p>
Wine's documentation concerning fonts leaves a lot to be desired.  
Fortunately most of the system is extremely simple to use once you
figure it out and then it Just Works.  Rob Shearman posted a patch to
rename the font "Wine Marlett" to just "Marlett".  Huw Davies 
wondered why that was needed,
<quote who="Huw Davies">
The font replacement mechanism should make this unnecessary.  Why
doesn't that work in this case?</quote></p>

<p>Rob explained the problem he ran into,
<quote who="Robert Shearman">
It enumerates the fonts, but Marlett isn't enumerated, only "Wine 
Marlett." I tried adding a value in the FontSubstitutes and Fonts 
registry keys and the problem was the same. You can test this very 
easily using notepad's Edit->Font dialog. Steam only started working 
when Marlett was listed as a font in there.</quote></p>

<p>A way to do that already exists in Wine and Huw gave an
example of how to use it (including the new registry paths set up
only days before by Alexandre):</p>
<quote who="Huw Davies"><p>

Yup, that's the fonts substitutes mechanism which is different from the
replacements one&amp;lt;g&amp;gt;  See LoadReplaceList in gdi/freetype.c
</p><p>
You need something like this:
<ul><code>
[HKCU\Software\Wine\Fonts\Replacements]<br />
"Marlett"="Wine Marlett"</code></ul>
</p></quote>

<p>
Rob reported that worked, but Alexandre raised the point that it required
users to have their registry configured properly.  Huw explained,
<quote who="Huw Davies">
It would be nice to have the Windows fonts overload the Wine ones if
they're present, which is what the current scheme does.  Now, for
TrueType fonts we could set the version low enough such that the
Windows fonts would win, but there's no version associated with a .fon
font so we couldn't use that trick there.

</quote></p>

<p>Alexandre thought that could be worked around with a different method,
<quote who="Alexandre Julliard">

Can't this be based on the font path, using the first font we find in
the path?  Then we just have to make sure the Windows dir is searched
first.
</quote></p>

<p>Huw didn't think that method was foolproof either:</p>
<quote who="Huw Davies"><p>
That would work if the Wine fonts end up in the Windows dir, but
aren't they likely to get installed into somewhere under
/usr/share/fonts ?
</p><p>
Also, I like the versioning thing, it lets me have the ms webfonts
under /usr/share/fonts and have /win/winnt/fonts in my fontconfig
path.  This way, if my Windows partition has a newer version of Arial than
the ms webfonts I get to use that, rather than it being on a first
come first serve basis.
</p><p>
Can't we just add the Replacement keys to wine.inf and be done with
it?</p></quote>

<p>Alexandre thought Wine should behave in a sane matter regardless of
the registry entries created by wine.inf.  With regards to font 
versioning, Wine would of course follow that method.  For fonts without
versions they would be used on a "first found" basis.  </p>

</section>
<section 
	title="ALSA Initialization Changes"
	subject="Alsa initialization change"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/06/0391.html"
	posts="9"
	startdate="13 Jun 2005 00:00:00 -0800"
	enddate="15 Jun 2005 00:00:00 -0800"
>
<topic>Multimedia</topic>
<mention>Unknown</mention>

<p>Jeremy White started off a thread about trying to fix Wine's ALSA
sound driver:</p>
<quote who="Jeremy White"><p>
<a href="http://www.winehq.com/hypermail/wine-devel/2005/06/att-0391/01-alsainit.diff">Attached</a> is a fairly sizable patch that revamps the
way Alsa initialization is done.

With this patch, Wine now does the following:  scan all cards given
by Alsa (not brute force 0-5), respect alsa defaults
and environment variable overrides, probe to see
if a reported Alsa device is useful (e.g. strip my
Modem from the list of reported sound cards),
and provide a mechanism for an end user to explicitly
configure Wine to use Alsa.
</p><p>
The default configuration values should 'just work'
in most cases, but the following registry values are
permitted to provide finer control:
<ul><code>
**  [Software\Wine\Wine\Config\ALSA]<br />
**  AutoScanCards           Whether or not to scan all known sound cards<br />
**                          and add them to Wine's list (default yes)<br />
**  AutoScanDevices         Whether or not to scan all known PCM devices<br />
**                          on each card (default no)<br />
**  UsePlugDevice           Whether or not to use the plug:hw device,<br />
**                          which automagically handles rate conversion (def yes)<br />
**  DeviceCount             If present, specifies the number of hard coded<br />
**                          Alsa devices to add to Wine's list; default 0<br />
**  DevicePCMn              Specifies the Alsa PCM devices to open for<br />
**                          Device n (where n goes from 1 to DeviceCount)<br />
**  DeviceCTLn              Specifies the Alsa control devices to open for<br />
**                          Device n (where n goes from 1 to DeviceCount)<br />
**<br />
**                          Using AutoScanCards no, and then Devicexxx info<br />
**                          is a way to exactly specify the devices used by Wine.
</code></ul></p><p>
I'd appreciate anyone passionately interested in Alsa
(Kevin?  Robert?) taking the time to try this patch.
</p><p>
I've tried to 'do no harm', but this is a material enough
change that I'm not yet comfortable submitting it to wine-patches.
</p><p>
fwiw, there is a (fairly thin) thread on the alsa dev lists
regerading this here:
   <ul><a href="http://sourceforge.net/mailarchive/forum.php?thread_id=7452725&amp;forum_id=1752">
   http://sourceforge.net/mailarchive/forum.php?thread_id=7452725&amp;forum_id=1752</a></ul></p></quote>

<p>Kevin Koltzau tried it out and found a problem:</p>
<quote who="Kevin Koltzau"><p>
In ALSA_TestDeviceForWine, the call to snd_pcm_open blocks if I have
any applications currently using my sound card, and does not complete
until all other apps accessing alsa close, effectively freezing wine
mixing is not supported on my card, so only one application
can open hw at a time, all others will block on snd_pcm_open
it does, however, work with
<ul><code>
[ALSA]<br />
"AutoScanCards"="n"<br />
"DeviceCount"="1"<br />
"DevicePCM1"="default"<br />
"DeviceCTL1"="default"</code></ul></p><p>

Sound card is standard AC'97 that comes with nForce4
<ul><code>
# lspci -v -s 00:04.0<br />
0000:00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)
<ul><code>
        Subsystem: ASUSTeK Computer Inc.: Unknown device 812a<br />
        Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 22<br />
        I/O ports at dc00<br />
        I/O ports at e000 [size=256]<br />
        Memory at d2003000 (32-bit, non-prefetchable) [size=4K]<br />
        Capabilities: [44] Power Management version 2</code></ul>
</code></ul></p></quote>
<p>
Jeremy and Kevin then exchanged some emails to track down the problem and
finally figured out it had to do with the way the sound device was being 
opened.  Kevin explained how his device was configured:</p>
<quote who="Kevin Koltzau"><p>
The sound card is in use by the dmix/dsnoop plugin.
my "default" device is actually a chain of plugins, a striped down
version of my .asoundrc is (let me know if you want my full config)
<ul><code>
pcm.output  {<br />
    &#160;&#160;type dmix<br />
    &#160;&#160;slave.pcm "hw:0,0"<br />
}<br />
pcm.input {<br />
    &#160;&#160;type dsnoop<br />
    &#160;&#160;slave.pcm "hw:0,0"<br />
}<br />
pcm.duplex {<br />
    &#160;&#160;type asym<br />
    &#160;&#160;playback.pcm "output"<br />
    &#160;&#160;capture.pcm "input"<br />
}<br />
pcm.!default {<br />
    &#160;&#160;type plug<br />
    &#160;&#160;slave.pcm "duplex"<br />
}<br />
ctl.!default {<br />
    &#160;&#160;type hw<br />
    &#160;&#160;card 0<br />
}
</code></ul><br />
</p><p>
so default goes through asym, which joins dsnoop and dmix, which
then actually access my hardware.
</p><p>
This is a pretty common config for cards that do not support hardware
mixing, IMO.
</p></quote>

<p>Kevin ran a test program that Jeremy came up with and it seemed to 
finally nail down the remaining issues.  The patch made it in later in the
week.</p>

</section>
<section 
	title="WineD3D Fun Project"
	subject="wine d3d fun projects."
	archive="http://www.winehq.com/hypermail/wine-devel/2005/06/0663.html"
	posts="3"
	startdate="21 Jun 2005 00:00:00 -0800"
	enddate="22 Jun 2005 00:00:00 -0800"
>
<topic>DirectX</topic>
<p>Oliver Stieber has been back at work on Wine's DirectX.  A bunch of
large patches appeared this week and made their way into CVS.  (Hooray!)
At a glance it looks like the patches are laying the groundwork for
larger additions.  Oliver had an idea this week for a project someone
could tackle that might prove to be interesting:</p>
<quote who="Oliver Stieber"><p>
     I have another 'fun' and useful project to add to
the list.
</p><p>
It should be fairly to make wined3d (or d3d8) use the
wgl (windows opengl) instead of glx. (just search for
glx commands and replace then with the wgl
equivalents)
</p><p>
Doing so would enable Wine's d3d to run on windows in
place of the windows driver and without the rest of
Wine which would greatly help in debugging.
</p><p>
It would also allow wined3d to use the wgl
implementation in Wine.
</p></quote>

<p>Scott Ritchie wondered if something like that had been done at a
driver level once before:</p>
<quote who="Scott Ritchie"><p>
 Didn't one of the video card makers experiment with
 something like this
 at one point, translating all Direct3d calls into
 OpenGL and just
 writing OpenGL-optimized drivers (or perhaps
 vice-versa)?</p></quote>

<p>Oliver knew of an example that worked the opposite way,
<quote who="Oliver Stieber">
Matrox had the Matrox icd, which 'translated' OpenGL
calls into DirectX calls.</quote></p>
</section>
<section 
	title="Cross-compiling Winelib Apps"
	subject="Cross-compiling with winelib"
	archive="http://www.winehq.com/hypermail/wine-devel/2005/06/0706.html"
	posts="2"
	startdate="23 Jun 2005 00:00:00 -0800"
>
<topic>Winelib</topic>

<p>Eric Frias wanted to add some cross-compiling support to Winelib
but needed some advice on how to approach it:</p>
<quote who="Eric Frias"><p>
We're working on setting up an environment to cross-compile a winelib 
application (initially from x86 linux to sparc solaris).  To do this, we 
need a cross-compiling version of winebuild which will generate the 
assembly code for the target architecture instead of the build architecture.
</p><p>
I see two basic ways we can accomplish this.  We could either use 
autoconf's --target flag to specify the target architecture, and then 
replace all of the "#ifdef __sparc__" statements in winebuild with 
"#ifdef __target_arch_sparc".  I came across an autoconf macro 
(<a href="http://autoconf-archive.cryp.to/ac_create_target_h.html">http://autoconf-archive.cryp.to/ac_create_target_h.html</a>) that would 
generate the appropriate defines.
</p><p>
The other way we could approach the problem is to modify winebuild to 
always generate assembly code for all of the architectures, pushing the 
#ifdefs down into the .spec.c file.
</p><p>
I'm inclined to stick with the first option, since it looks like less 
work and less chance of introducing errors, but I wanted to run it by 
the list before starting work.  Would a patch like this be accepted into 
wine?  Do you know of any other gotchas we should be aware of?
</p></quote>

<p>Alexandre suggested an idea similar to the second approach:</p>
<quote who="Alexandre Julliard">
<p>
I think the right way is to get rid of the #ifdefs, but not by pushing
them into the .spec.c file but my making the target a run-time
option. I've been meaning to do this for a while now, I was just
waiting for someone to actually need that feature ;-)</p></quote>
</section>

<p>Eric thought about it and had the following ideas to add:</p>
<quote who="Eric Frias"><p>
Fantastic!  Those ifdefs have been driving me crazy.  After adding 
support in winebuild for hppa, I found the source code extremely 
difficult to follow.  Cutting out most of the ifdefs should make it much 
more manageable.
</p><p>
So we could do something like this:  Add a --target= option to both 
winegcc and winebuild.  If present, winegcc would pass that option 
through to winebuild.  The target parameter could be a standard 
cpu-mfr-opsys system triplet like config.guess generates.  Without this 
--target option, the behavior is unchanged.  If the --target=foo is 
present, we generate assembler code for the 'foo' architecture.
</p><p>
Additionally, we could set the default compiler to foo-gcc, linker to 
foo-ld, (and same for g++, nm, cpp, whatever else we use).  These are 
the default filenames for cross-compilers, so I think it would make 
sense to use these when the target is specified.  These could be 
overridden by command line args (there's already an --ld-cmd, so we 
could add --cc-cmd, --cxx-cmd, etc).</p></quote>
<section 
	title="Wine + Subversion + SVK" 
	subject="Using SVK and Subversion to manage distributed branches to Wine CVS"
	archive="http://www.winehq.org/hypermail/wine-devel/2005/06/0582.html" 
	posts="1"
	startdate="19 Jun 2005 00:00:00 -0800"
>
<topic>Project Management</topic>
<p>Troy Rollo has been working with SVK over the past few weeks.  I've
been meaning to post something about this, but thus far all of the
work has appeared only on the Wiki.  Troy explained how to get started:</p>
<quote who="Troy Rollo"><p>
Over the past few weeks I have been experimenting with SVK and Subversion 
managing a handful of branches to Wine CVS, and it appears to be working 
well. The system is based on a "central" Subversion repository that mirrors 
the Wine CVS tree without any modifications (publicly readable at 
<tt>svn://wine-svn.troy.rollo.name/wine/wine/</tt>) and is kept up to date 
within a day or so.
</p><p>
Branches are stored in separate Subversion repositories.
</p><p>
I am finding this very convenient. If you have converted from CVS to 
Subversion on other projects, you are probably aware of the huge difference 
it makes. Adding SVK on top of Subversion is another giant leap when you have 
distributed development. In the case of Wine, however, with the CVS 
repository being read-only except to Alexandre, the difference between 
read-only CVS and the combination of Subversion and SVK is even more dramatic 
(I would compare it to the difference between chiselling documents into stone 
tablets and using a word processor).
</p><p>
For anybody who is interested in moving their own Wine development to 
Subversion and SVK, there is a page on the Wiki describing what to do at 
<a href="http://wiki.winehq.com/SVK">http://wiki.winehq.com/SVK</a>.
</p></quote>
</section></kc>
