<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abort, Retry, Hack? &#187; linux</title>
	<atom:link href="http://marcansoft.com/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcansoft.com/blog</link>
	<description>[ marcan&#039;s blog ]</description>
	<lastBuildDate>Tue, 22 Dec 2009 16:26:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>iPhone syncing on Linux, part 2</title>
		<link>http://marcansoft.com/blog/2009/10/iphone-syncing-on-linux-part-2/</link>
		<comments>http://marcansoft.com/blog/2009/10/iphone-syncing-on-linux-part-2/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 06:16:07 +0000</pubDate>
		<dc:creator>marcan</dc:creator>
				<category><![CDATA[iPhone on Linux]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[herebedragons]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://marcansoft.com/blog/?p=145</guid>
		<description><![CDATA[Last post was more along the lines of an announcement, so here&#8217;s a more concrete guide. There have been new releases of most parts of the software stack in the past few days, so now is the time to grab them if you&#8217;re interested. Libgpod is the exception, since it&#8217;s still being worked on to [...]]]></description>
			<content:encoded><![CDATA[<p>Last post was more along the lines of an announcement, so here&#8217;s a more concrete guide. There have been new releases of most parts of the software stack in the past few days, so now is the time to grab them if you&#8217;re interested. Libgpod is the exception, since it&#8217;s still being worked on to get proper support for the iPhone OS 3.x database. That said, if you&#8217;re interested in being an early adopter of iPhone sync support and helping us test it, here&#8217;s how.<br />
<span id="more-145"></span><br />
<b>If you are a new or inexperienced user, or you are not used to compiling things from source, editing configuration files, and doing some basic troubleshooting, stop here</b>. This isn&#8217;t ready for you. In the not too distant future, distros will package this, it will be delivered with your usual dose of healthy and working open source software, and it will all work automagically as soon as you plug in your device.</p>
<p>A few notes:</p>
<ul>
<li>Keep in mind that if you&#8217;re using distro packages for anything I&#8217;m going to mention here, you&#8217;ll need the development headers too (<code>-dev</code> package or similar).</li>
<li>When linking to packages below, I&#8217;ll link the name to the homepage and the version to a download link or something close to it: if you&#8217;re reading this post soon after it was posted, then the versions should be up to date. If it&#8217;s been more than a few days, you should check for newer versions.
<li>You&#8217;ll also need <a href="http://cmake.org/">cmake</a> to build some things (2.6 or newer); your distro should provide a package for it.</li>
<li>Most packages will install to <code>/usr/local</code> by default. This should be fine, but you may have to uninstall any older distro packages that live at <code>/usr</code>, and apps may or may not pick up libraries on <code>/usr/local</code>. If you want, you can change the prefix to /usr. You should already know how to do this for autotools-based packages. For CMake-based ones, pass something like <code>-DCMAKE_INSTALL_PREFIX=/usr</code> when calling cmake.</li>
<li>The libiphone/ifuse page has links to distro repositories with packaged versions of everything <a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page#Ubuntu_Intrepid.2FJaunty">here</a>. Yay, you&#8217;ve just saved a bunch of time! Do follow the steps below, but you can use these packages instead of building from source.</li>
</ul>
<p><b>Possible pitfalls</b>:</p>
<ul>
<li>If you&#8217;ve had prior versions of usbmuxd/libiphone/etc, make sure they&#8217;re gone, especially any udev rules files in <code>/etc/udev/rules.d</code>.</li>
<li>If you&#8217;ve been syncing via SSH, and you log in as root, your permissions might be messed up. Run <code>chown -R mobile /var/mobile/Media</code> on the phone, and make sure you don&#8217;t get any permission errors when changing files via an ifuse mount.</li>
<li>There&#8217;s a udev bug that causes usbmuxd not to respond to signals, which means it will never quit if you remove all devices, and it might not detect any new devices after you&#8217;ve plugged in the one that caused it to start up. As a workaround, <code>kill -9</code> it, and run it from the console. A workaround for this bug is also in the usbmuxd Git repo.</li>
</ul>
<h3>Step 1</h3>
<p>Install <a href="http://www.libusb.org/wiki/Libusb1.0">libusb</a>-<a href="http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.3/libusb-1.0.3.tar.bz2/download">1.0.3</a> (or newer). This should be straightforward. If your distro carries it, that&#8217;s fine, just make sure it&#8217;s 1.0.3 at least (if it isn&#8217;t, the repos I mentioned above probably have it).</p>
<h3>Step 2</h3>
<p>Install <a href="/blog/iphonelinux/usbmuxd/">usbmuxd</a>-<a href="http://marcansoft.com/uploads/usbmuxd/usbmuxd-1.0.0.tar.bz2">1.0.0</a>. Make sure you read the <code>README</code> file, especially the part about creating a user named <code>usbmux</code> with USB access permissions (does not apply if you&#8217;re using distro packages, hopefully). After installing usbmuxd, you should increase the syslog debug level by editing <code>/lib/udev/rules.d/85-usbmuxd.rules</code> and adding <code>-v -v</code> flags to the end of both <code>RUN</code> statements, like this: <code>RUN+="/usr/sbin/usbmuxd -u -U -v -v"</code> (and similarly for the other line). This will get you useful debug information in syslog without flooding you with messages.</p>
<p>Have syslog open (<code>tail -f</code>, xconsole, whatever). Plug in (or replug) your device. You should see something like this:</p>
<pre>usb 3-4.3: new high speed USB device using ehci_hcd and address 68
[...]
usbmuxd[12705]: [3] usbmux v1.0.0 starting up
usbmuxd[12707]: [4] Creating socket
usbmuxd[12707]: [3] Successfully dropped privileges to 'usbmux'
usbmuxd[12707]: [4] Initializing USB
usbmuxd[12707]: [4] Found new device with v/p 05ac:1290 at 3-68
usbmuxd[12707]: [4] Using wMaxPacketSize=512 for device 3-68
usbmuxd[12707]: [3] Connecting to new device on location 0x30044 as ID 1
usbmuxd[12707]: [4] 1 device detected
usbmuxd[12707]: [3] Initialization complete
usbmuxd[12707]: [3] Connected to v1.0 device 1 on location 0x30044 with serial number be2975afb30b6db9025f95261b9e0a7041044661</pre>
<p>If you don&#8217;t see anything related to usbmuxd, either you forgot the <code>-v -v</code> or you need to reload your udev rules: <code>$ sudo udevadm control --reload-rules</code>. As a last resort, try rebooting. If it still doesn&#8217;t work, something&#8217;s wrong. You can continue by running usbmuxd manually as explained in the README, but you should report a bug.</p>
<p>If you have a jailbroken phone with SSH, try running <code>$ iproxy 2222 22</code> and then SSH to localhost, port 2222 on another console. You should be able to SSH into your phone.</p>
<p>Unplug your phone. If usbmuxd was started via udev (not manually), it should quit. If it doesn&#8217;t, report a bug.</p>
<h3>Step 3</h3>
<p>Install <a href="http://github.com/JonathanBeck/libplist">libplist-<a href="http://cloud.github.com/downloads/JonathanBeck/libplist/libplist-0.16.tar.bz2">0.16</a> and then <a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page">libiphone</a>-<a href="http://cloud.github.com/downloads/MattColyer/libiphone/libiphone-0.9.4.tar.bz2">0.9.4</a> and <a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page">ifuse</a>-<a href="http://cloud.github.com/downloads/MattColyer/ifuse/ifuse-0.9.4.tar.bz2">0.9.4</a>.</p>
<p>Now you should be able to mount your phone by simply running <code>$ ifuse &lt;mountpoint&gt;</code>. You should be able to see the media folder structure and even grab photos and other stuff. If you have a jailbroken phone, you can use the <code>--root</code> option to mount the root filesystem with root privileges (I usually prefer ssh/sshfs for this, though). <b>Do NOT use the <code>--root</code> option to sync music, it will not work and may mess up your permissions.</b></p>
<p><b>If you have access to more than one iPhone or iPod Touch</b>, we could use some multiple-device testing! Usbmuxd should happily start up when you plug in the first device, keep running while you plug in any other devices, and stop once all devices have been removed. Usbmuxd will report the device UUIDs (it calls them &#8220;serial numbers&#8221;) as they are connected (if you&#8217;re using <code>-v -v</code>). You should be able to pass the <code>--uuid=&lt;uuid&gt;</code> option to ifuse to mount a specific device. Please test this for us!</p>
<h3>Intermission</h3>
<p><b>If you are not used to alpha software, checking out development sources, testing patches, and working with developers, stop here</b>. Now you&#8217;ve got all the underlying stuff working, so you&#8217;re probably better off waiting for some time until libgpod stabilizes some and things are merged and tested.</p>
<p>If you are a developer willing to help, a very enthusiastic power user, or simply a masochist, feel free to read on. Be warned: pain lies ahead, don&#8217;t even think about using the following for day-to-day use at this point in time. From here on there are no distro packages and no nice source tarballs. Experiments and feedback only. This Will Eat Your Music Collection For Dinner And Replace It With Hours And Hours Of &lt;insert terrible music&gt;.</p>
<h3 style="color: #d00">Step 4</h3>
<p>Clone <del datetime="2009-12-22T16:21:48+00:00"><a href="http://gitorious.org/~teuf/libgpod/teuf-sandbox">teuf&#8217;s sandbox</a> Git repository for libgpod, and <b>switch to the <code>iphone30</code> branch</b></del> <a href="http://gtkpod.git.sourceforge.net/git/gitweb.cgi?p=gtkpod/libgpod;a=summary">the libgpod git repository at SourceForge</a>, then compile and install it:</p>
<pre>$ git clone git://gtkpod.git.sourceforge.net/gitroot/gtkpod/libgpod
$ cd libgpod
$ CFLAGS="-g -O0" sh autogen.sh --prefix=/usr
$ make
$ sudo make install</pre>
<h3 style="color: #d00">Step 5</h3>
<p>Mount the device and create the <code>iTunes_Control/Device</code> directory. Then, get your UUID (it should be in the syslog from usbmuxd, or you can find it by running <code>$ lsusb -v | grep -i iSerial</code>). It should be 40 characters long. Then, run <code>$ tools/ipod-read-sysinfo-extended &lt;uuid&gt; &lt;mountpoint&gt;</code>. This should generate a file named <code>iTunes_Control/Device/SysInfoExtended</code>. Make sure it&#8217;s not empty and whatnot; it should be a large-ish plist (XML file) with a bunch of info.</p>
<h3 style="color: #d00">Step 6</h3>
<p>Make sure your device already contains a valid music database created by iTunes. If it doesn&#8217;t, drop me a line on IRC and we can try some cool new stuff. New databases can be created, but there might be issues and you need some way of generating the <code>HashInfo</code> file (more on this later).</p>
<h3 style="color: #d00">Step 7</h3>
<p>Open an application that uses libgpod to manage iPods. Gtkpod is recommended at this stage, as its what I use to test. Other apps (Rhythmbox, Amarok, etc) <i>theoretically</i> should work. Theoretically, because Amarok 1.4 crashes/hangs pretty badly for me, for example, and I&#8217;m not sure who is to blame. I&#8217;d like to hear any success or failure stories. Please run your app from a console so you can see any debug messages.</p>
<p>First, load your device. Once the application has accessed the music library, a new file called <code>HashInfo</code> should have popped up in the <code>iTunes_Control/Device</code> directory. If it isn&#8217;t there, you&#8217;ve got a problem: check stdout for any messages and and preferably ping me on IRC or at least e-mail me your UUID and your iTunes-created <code>iTunes_Control/iTunes/iTunesCDB</code> file (it shouldn&#8217;t have been modified yet).</p>
<p>Make some changes (add a song, make a playlist, etc), save, and cross your fingers. With any luck, you&#8217;ll get some debug spew, any songs will transfer, the iPhone/iPod will show a pretty &#8220;syncing&#8221; screen, the database will be written, the &#8220;syncing&#8221; screen will go away, and you&#8217;ll be able to launch the iPod application and see your changes and play any new songs. There will be bugs at this stage, but please do report any issues along with expected behavior.</p>
<h3 style="color: #d00">Step 8</h3>
<p>Plug your device into a computer running iTunes (unmount it on your Linux computer first!) and check that it can see the changes made with libgpod. This is very important, because <b>iTunes and the device use different databases</b>: the data managed by iTunes and libgpod is maintained in an <code>iTunesCDB</code> (a compressed version of the old, classic <code>iTunesDB</code> format), but it is converted to a new SQLite database format for the iPod app to use. So both libgpod and iTunes read the <code>iTunesCDB</code>, but they write out the <code>iTunesCDB</code> <b>and</b> the SQLite databases. You should be able to make changes in iTunes and swap your device from iTunes to libgpod and back and see them, etc.</p>
<h3>Bugs</h3>
<p>Tons. The only things tested to work are managing simple music and working with simple playlists. There&#8217;s a known annoying bug where the iTunes special playlists (Ringtones/etc) are converted to normal playlists by libgpod, and then iTunes recreates them if you use it again, creating duplicates each time you switch between using libgpod and iTunes. The DB schema is outdated (3.0 instead of 3.1), so you&#8217;ll see a (hopefully short) &#8220;Updating&#8221; step when you launch the iPod app. Please report issues, but keep in mind that they&#8217;re to be expected. This is very very very alpha code. I probably screwed up something on this post even, so chances are you&#8217;ll get stuck somewhere. Tough luck, it&#8217;s 7am and I need to catch some sleep <img src='http://marcansoft.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Hope you had fun! Keep in mind that you can usually find us on #gtkpod on freenode if you need to report an issue. Comments on this post are fine too, for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://marcansoft.com/blog/2009/10/iphone-syncing-on-linux-part-2/feed/</wfw:commentRss>
		<slash:comments>158</slash:comments>
		</item>
		<item>
		<title>iPhone syncing on Linux</title>
		<link>http://marcansoft.com/blog/2009/10/iphone-syncing-on-linux/</link>
		<comments>http://marcansoft.com/blog/2009/10/iphone-syncing-on-linux/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 18:46:11 +0000</pubDate>
		<dc:creator>marcan</dc:creator>
				<category><![CDATA[iPhone on Linux]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[usbmuxd]]></category>

		<guid isPermaLink="false">http://marcansoft.com/blog/?p=104</guid>
		<description><![CDATA[Those who watch my git repos may have noticed that I&#8217;ve been working on this for a while now. iPhones and iPod Touches have never been properly supported under Linux (especially non-jailbroken devices) because they are just so different from all the previous iPod models. There was a lot of new code to write and [...]]]></description>
			<content:encoded><![CDATA[<p>Those who watch my <a href="http://git.marcansoft.com/">git repos</a> may have noticed that I&#8217;ve been working on this for a while now. iPhones and iPod Touches have never been properly supported under Linux (especially non-jailbroken devices) because they are just so different from all the previous iPod models. There was a lot of new code to write and Apple hasn&#8217;t exactly made it easy either:</p>
<ul>
<li>The iPhone uses a custom USB communications protocol, connection-oriented, which is totally different from standard mass storage devices</li>
<li>It provides multiple services over this protocol, and many have to be interacted with to complete sync</li>
<li>iPhone OS 2.x brought us a new hash (designed to lock users into iTunes) that so far had not been reverse engineered</li>
<li>iPhone OS 3.x brought us a new SQLite-based database format which, although a lot more Linux-friendly than the old proprietary format, does require a bunch of new code (and the old format still needs to be supported for compatibility).</li>
</ul>
<p>Well, I&#8217;m happy to say that all of this is coming to an end and that Linux will finally get quite complete iPhone/iPod Touch syncing support soon, thanks to the work of many dedicated people. <span id="more-104"></span>This is what the software stack looks like:</p>
<p><img src="/transf/iphonelinux-stack.png" alt=""/></p>
<ul>
<li><a href="http://www.libusb.org/wiki/Libusb1.0">libusb-1.0</a> provides an advanced API to access USB devices under Linux, replacing the old libusb-0.1 API</li>
<li><a href="/blog/iphonelinux/usbmuxd/">usbmuxd</a> coordinates application access to the device and talks the specific iPhone/iTouch USB protocol</li>
<li><a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page">libiphone</a> implements the Apple-specific protocols that are tunneled through usbmuxd: it can launch services through lockdown, retrieve device info, send notifications, and access the filesystem via AFC.</li>
<li><a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page">iFuse</a> and <a href="http://cgit.sukimashita.com/gvfs-backend-afc.git/">gvfs-backend-afc</a> both provide access to AFC to regular Linux apps. iFuse does this by mounting via FUSE, while gvfs-backend-afc is obviously a backend for gVFS.</li>
<li><a href="http://www.gtkpod.org/libgpod/">libgpod</a> (the library that traditionally has managed music databases for iPods) is being extended to support the new SQLite format, the new hash, and also to talk to libiphone to properly put the device in to and out of sync mode.</li>
<li>Theoretically, actual music players such as Amarok and Rhythmbox will need none or very few modifications to work.</li>
</ul>
<p>I originally started work on usbmuxd which I am maintaining, and I&#8217;m now helping libgpod compatibility with the new formats. The software stack needs to be working from the bottom up, so I&#8217;ve just tagged and released the first <a href="/blog/iphonelinux/usbmuxd/">Release Candidate for usbmuxd-1.0.0</a>. If you have an iPhone or an iPod Touch and you&#8217;d like to use them with Linux in the future, I encourage you to test it out. If your device is jailbroken, you get the immediate benefit of being able to SSH over USB (which is a <b>lot</b> faster than over WiFi!), and if you&#8217;re using firmware 2.x or earlier and the hacky sync-over-WiFi-with-sshfs method, you can immediately get a speed boost by doing it over USB.</p>
<p>If you&#8217;re feeling adventurous, the development versions of libiphone and iFuse are also quite good. Theoretically, if your usbmuxd is working an you&#8217;ve got iFuse installed, you can just type &#8220;ifuse &lt;mountpoint&gt;&#8221; and instantly have your device mounted. Don&#8217;t expect to get libgpod to work at this time without quite some pain though. If you&#8217;re a developer and you&#8217;re feeling <b>really</b> adventurous though, you can join us on #gtkpod on freenode and help us test and fix the new libgpod support!</p>
<p>Please report any bugs or fixes in usbmuxd either directly to <a href="mailto:hector@marcansoft.com">me</a> or to the <a href="http://lists.mattcolyer.com/listinfo.cgi/iphone-linux-dev-mattcolyer.com">iphone-linux-dev mailing list</a>. Any issues with libiphone or iFuse should also go to the list.</p>
]]></content:encoded>
			<wfw:commentRss>http://marcansoft.com/blog/2009/10/iphone-syncing-on-linux/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Acer Aspire 8930G Linux audio support</title>
		<link>http://marcansoft.com/blog/2009/06/acer-aspire-8930g-linux-audio-support/</link>
		<comments>http://marcansoft.com/blog/2009/06/acer-aspire-8930g-linux-audio-support/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 05:30:28 +0000</pubDate>
		<dc:creator>marcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[acer]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[reveng]]></category>

		<guid isPermaLink="false">http://marcansoft.com/blog/?p=40</guid>
		<description><![CDATA[I&#8217;ll eventually write a longer post about how different bits and pieces of this laptop&#8217;s hardware fare under Linux. For now, I&#8217;ve managed to strike one of the more annoying issues: proper audio. Scroll down if you&#8217;re impatient and want the code; read on if you want the full story. This laptop is peculiar because [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll eventually write a longer post about how different bits and pieces of this laptop&#8217;s hardware fare under Linux. For now, I&#8217;ve managed to strike one of the more annoying issues: proper audio. Scroll down if you&#8217;re impatient and want the code; read on if you want the full story.</p>
<p>This laptop is peculiar because it has built-in &#8220;5.1&#8243; audio. Yes, it does really have 6 speakers, though you&#8217;d be hard pressed to get much spatial separation out of them (and they aren&#8217;t even placed around symmetrically). However, the speakers do end up making a very decent multiway audio system, by laptop standards: the &#8220;rear&#8221; pair (which is actually between the keyboard and the screen; the mind boggles) is good with the high end, the &#8220;front&#8221; and center speakers (front edge of the laptop) are your average mediocre speakers that can handle mid-end, and the &#8220;Tuba&#8221; not-so-&#8221;sub&#8221; woofer fills in enough low-end to equal a decent overall speaker, although of course with zero stereo/spatial separation since there&#8217;s only one of it (actual subwoofers can pull off mono because the human ear can&#8217;t really hear spatial position at <b>low</b> frequencies, but the Tuba is more like the only non-sucky speaker in the entire laptop).</p>
<p>What this boils down to is that you <b>really</b> want good audio support for all 6 speakers if you want to take advantage of the audio capabilities at all. Most importantly, stereo needs to be upmixed and a good portion of the normal audio needs to be routed to the Tuba. ALSA&#8217;s asound.conf makes this easy, assuming the actual hardware works fine. Of course, that&#8217;s not the case.<br />
<span id="more-40"></span><br />
This thing uses (of course) Intel HDA audio with a Realtek ALC889 codec. This codec is fairly new and support is of course still a bit sketchy. There are two parts to getting things to work: the software needs to know how to talk to the ALC889 codec, and it also needs to know how to configure it to work with the laptop&#8217;s hardware design (i.e. how the chip&#8217;s outputs connect to the actual speakers and jacks, which varies). After reading up on HDA audio codec specs and looking for examples, the latter part wasn&#8217;t very hard. There&#8217;s even a tool called <a href="http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer">hda-analyzer</a> which lets you tweak most HDA configuration on the fly with a nifty GUI. I also rendered a <a href="http://marcansoft.com/transf/codec.png">graph</a> (warning: large image) of the codec&#8217;s internal audio routing.</p>
<p>Unfortunately, after verifying that I had mapped all of the connections properly and could get individual output through any one of the speakers and audio jacks, I hit a showstopper. The codec has 5 stereo DACs (10 channels total, nominally 7.1 plus an extra stereo connection) but only the first two DACs worked, which gave me 4.0 audio. They rest just appeared to be completely dead. I knew the problem was with the DACs because I could remap the audio outputs to use one of the first two DACs and that worked, and I could tell the first two DACs to play other channels from the input stream and that worked fine too. Audio was getting to the chip, and audio could get out from the chip, but somewhere during the digital-to-analog conversion for DACs 3-5 it was just disappearing. I searched the Realtek datasheet and ALC specs for info on how to turn DACs off or on but found no such thing. Of course, a standard wouldn&#8217;t be complete without a mechanism for vendor-specified proprietary extensions (and those standards that don&#8217;t have them are abused anyway). HDA has these things called coefficient registers, which is just a dumb name for vendor proprietary registers. ALSA already has some code to tweak these on other Realtek codecs, though nothing related to turning DACs on or off. At this point this was clearly Realtek&#8217;s fault for not documenting how to turn on DACs that are <b>turned off by default</b>. So I e-mailed them describing the issue in clear terms, and, in response, got treated like a clueless end-user. They kept sending me patched/modified versions of the realtek support for ALSA with useless changes like support for new laptops and the like and no actual changes to fix the DAC issue. Of course, none of it was helpful, and I gave up on playing along after a couple weeks of wasted time.</p>
<p>Eventually this annoyed me enough that I just desperately tried flipping every bit in every coefficient register. After about 45 minutes of mind-numbing tones (I made a little multichannel test tone using a pentatonic scale which looped a couple thousand times until I was done) I didn&#8217;t find the magic bit to turn on the DACs, but I found <b>two</b> registers able to kill the already-working DACs, guessed a bit, and found out that you need to clear <b>both</b> of them to enable the broken DACs. Success.</p>
<p>Long story short, this, along with proper support for the laptop&#8217;s hardware and such, should be in the next version of ALSA. If you&#8217;re impatient, grab <a href="http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff_plain;h=7082fef37ca21ba0b52a7ae2cae9aa3b5bcc888c;hp=bf939f4cb618f9b10b673f22005196b89c6cc108">this patch</a> and apply it. The one thing that&#8217;s missing is internal mic support (it&#8217;s in there but I don&#8217;t think it works) &#8211; I tried a few things and came up dry, but I don&#8217;t really plan on using it anyway. You&#8217;ll also want an asound.conf to do the upmixing: <a href="http://marcansoft.com/transf/asound.conf">this</a> is what I use. Just place it in /etc (back up / merge your distro&#8217;s version, if any, before you overwrite it!).</p>
<p>Lastly, if you have another Acer laptop with similar audio capabilities, the code will probably work for you but it won&#8217;t autodetect the laptop. You&#8217;ll want to use the option &#8220;model=acer-aspire-8930g&#8221; when loading the snd-hda-intel module to force it. For example, it&#8217;s very likely that it will work with the 8920G. If it works, send the output of &#8220;lspci -v&#8221; or &#8220;sudo lspci -v&#8221; to <a href="mailto:hector@marcansoft.com">me</a> or an ALSA developer so it can be added to the list.</p>
<p><b>Update</b>: I submitted another patch to fix input issues. This gives you the full 3 capture devices, one of which can capture the internal front microphone (the others can&#8217;t; that&#8217;s a chip limitation). The microphone is stereo but due to the weird sum/difference format I&#8217;ve hacked it to just output mono to the device. The stereo is useless anyway, since the mics are too close together. Grab the patch <a href="http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff_plain;h=6f387d0412952ba0a3ae0578b7a98ff622c39215">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://marcansoft.com/blog/2009/06/acer-aspire-8930g-linux-audio-support/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
