Thursday, October 29, 2009

audioemu10k driver pushed

I just pushed the audioemu10k driver into Solaris -- it will be in builds 128 and higher. Here's what the flag day message said:

The push of CR 6539690 introduces support for audio for Creative Sound Blaster Live! and Audigy devices based on the EMU 10K1 and 10K2 devices. If you have such a device, you can now enjoy audio playback and record support using your audio device.

Devices supported are identifiable by the PCI ids pci1102,2, pci1102,4, and pci1102,8. This should be the full set of Sound Blaster Live! and Audigy PCI devices not already supported by the audiols or audiop16x drivers. It does not include support for any X-Fi devices.

This driver includes 5.1 and 7.1 surround sound support, and SPDIF support, for devices that are capable of it. It also includes support for the various break out boxes (Live! Drive and Platinum products), although it does not include support for MIDI or the infrared remote control found on such boxes.

I still would enjoy receiving test feedback, especially for folks who want to use it with unusual configurations or for more than just plain stereo output.

Tuesday, October 27, 2009

Taking myself off of laptop discuss

I'm tired of seeing bounce messages each time I reply to some thread on laptop-discuss@. The draconian list management policy is set such that when I reply to a message delivered to me, it always results in a bounce. This happens a couple of times a week when I try to reply to a message where I think I might have helpful information. (The bounces might have been due to a bogus attempt on my part to use a vanity address in my subscription, I don't know. To be honest, I don't really care -- it should not matter. This has become a matter of principle to me.)

I think there is a way I can cobble my list subscription address to work, and there are solutions where I can subscribe multiple times to the list, but I refuse to go to ridiculous contortions because the list manager for this list still refuses to actually moderate the list.

(Mailman has both support for manual moderation of addresses that are not subscribed to it and the moderator can also whitelist addresses that he knows are from reasonable posters. This is the procedure I use for managing the several lists I maintain.)

Btw, this problem is probably going to impact nearly every Sun employee post Oracle acquisition, by the way, particularly if Oracle does header rewriting to rewrite outbound From: headers to be some address.

If you want my participation on laptop-discuss (and this will probably also happen to driver-discuss), then ask the list moderator to change his way of doing business. (Or perhaps, to actually start doing the real duty of moderating posts instead of setting a draconian policy and then ignoring it.)

Monday, October 26, 2009

SDcards and ZFS

I've gotten this question a few times. "Would SDcards make a good ZIL device?" "Would SDcards make good ZFS devices?" The answer to both is resoundingly no.

The reason for this is simple, and is the same reason you should never reformat SDcard media using your computer.

It boils down to the fact that you need to do some very "SDcard" specific optimizations when you layout your filesystems in order to get good performance. (The details for this are only available after signing an NDA with the SDcard trade association, btw.) Of course, general purpose computers use general purpose filesystem code, which is targetted for hard disks. So the optimizations, if there are any, are all wrong for SDcard media. (Note that this only matters when doing the initial filesystem layout .... i.e. when you are formatting the media.)

You can reclaim at least some of the performance you might have lost if you've made this mistake, by reformatting the media in your camera. But unless you have a much fancier camera than I do, your camera probably doesn't speak ZFS.

hacking perl to help my kids at school

So I have three kids, and they are all in elementary school. And right now all three of them are still trying to memorize their multiplication tables. Apparently the schools these days teach the kids to start by "counting up" (3, 6, 9, 12 ... etc for 3's) rather than going straight towards memorization as I recall we were taught.

So now they're still counting up, and have not memorized these basic facts.

So I had the idea that we need to give them sheets with practice problems, like the timed ones they do in school. I figure if they have to do this a lot, then eventually the facts will just "sink in".

This is when the wife pipes up: "hey can you write a program to do that?" (If only I had a nickel for every time the wife asked "can you write a program to do that?"...)

Well, this one was easy, took me about 20 minutes in perl. I wrote a script, "" that dumps text file of some 144 problems suitable for sending to the printer. Here's sample output:

gdamore@pepper{18}> perl ~/ -r
Practice: (# 650)
Times tables from 1 to 12.
All mixed up!

4 x 7 = 5 x 7 = 1 x 10 = 2 x 9 = 10 x 9 = 6 x 7 =

12 x 10 = 1 x 4 = 2 x 5 = 6 x 3 = 5 x 12 = 11 x 8 =

2 x 12 = 1 x 1 = 7 x 4 = 3 x 10 = 9 x 10 = 6 x 11 =

Command line switches: "-r" to randomize the problems a bit (although every problem is given), "-s " to set the numbers to start from, and "-e " to set the ending problem (note that the second values are constrained from 1..12, because that's what the kids in school need), "-S " to set a seed (so can regenerate a previous sheet) and "-a" for an "answers sheet" (which is really only useful if you want the child to use it to check her own work. Because you should know all these facts so cold that you can check without an answer key, right? Right?)

Here's the code. Feel free to pass it around, give it away, modify it, whatever. It can be adapted to other kinds of problems pretty easily, I expect. Maybe you know a teacher or parent who could use this dumb little script. Maybe you just need to practice your multiplication tables on your own? I won't tell!


use Getopt::Std;

my $start = 1;
my $end = 12;

my @problems;

sub usage() {
print STDERR basename($0), ": usage\n";
print STDERR "problems: [ -r ] [ -a ] [ -s ] [ -e ]\n";

$seed = int(rand(1000));

my $s, $e, $i, $j;
getopts('rs:e:aS:', \%opt) || usage;
$dorand = exists($opt{'r'});
$doans = exists($opt{'a'});
$start = $opt{'s'} if exists($opt{'s'});
$end = $opt{'e'} if exists($opt{'e'});
$seed = $opt{'S'} if exists($opt{'S'});


$i = 0;
$s = $start;
$idx = 0;
foreach $i (1..12) {
foreach $j (1..12) {
$problems[$idx]->{'problem'} =
sprintf("%2d x %2d = ", $s, $j);
$problems[$idx]->{'answer'} =
sprintf("%2d x %2d =%3d " , $s, $j, $s * $j);
$problems[$idx]->{'defined'} = 1;
$idx = $idx + 1;
$s = $s + 1;
if ($s > $end) {
$s = $start;

@new = ();
if ($dorand) {
for( @problems ){
my $r = rand @new+1;
$new[$r] = $_;
} else {
@new = @problems;

if ($doans) {
printf("\tAnswers: %s\n", $dorand ? "(# $seed)" : "");
} else {
printf("\tPractice: %s\n", $dorand ? "(# $seed)" : "");

printf("\tTimes tables from $start to $end.\n");
if ($dorand) {
printf("\tAll mixed up!\n");
foreach $x (0 .. 1) {
$idx = $x * (72);
for $y ( 1 ..12) {
if ($doans) {
$new[$idx + 12]->{'answer'},
$new[$idx + 24]->{'answer'},
$new[$idx + 36]->{'answer'},
$new[$idx + 48]->{'answer'},
$new[$idx + 60]->{'answer'},
$new[$idx + 72]->{'answer'});
} else {
$new[$idx + 12]->{'problem'},
$new[$idx + 24]->{'problem'},
$new[$idx + 36]->{'problem'},
$new[$idx + 48]->{'problem'},
$new[$idx + 60]->{'problem'},
$new[$idx + 72]->{'problem'});
$idx = $idx + 1;

Feeling Marginalized by OpenSolaris





Friday, October 23, 2009

Call for testers: audioemu10K

I've just posted another update to the audioemu10k package. This update completely redesigned the underlying timing and interrupt support, and as a result it should work better with Suspend/Resume (without getting engine underruns.)

I've posted a webrev as well, and would really appreciate help with codereview.

Additionally, I've fixed the mixer a bit, to the point that I'm confident that a number of devices work perfectly. But some don't. Here's my test results so far:

  • CT4670 -- (Sound Blaster Live!) verified 100% functional, including 4.0 surround.
  • SB0100 -- (Sound Blaster Live! 5.1) SPDIF works, 4.0 surround works, no center/lfe output in 5.1 mode. Can't figure out why. (Would love to hear advice on this one.)
  • SB0400 (Audigy 2 Value) -- works perfectly. Including full 5.1 surround, SPDIF output. I've not tested the side 7.1 channels because I don't have the necessary cable to do so.
  • SB0350 (Audigy 2 ZS Platinum) -- surround sound on rear jacks works fine in 5.1 (can't test 7.1). My expansion box appears to be kaput though (doesn't work in Linux either), so I need help testing this from someone else who has a working one.
Those are the only devices I have on hand to test, but the driver can in theory support many many more. If you can expand the supported test, please let me know.


Monday, October 19, 2009

test audioemu10k driver posted

I've posted a test package containing the "audioemu10k" driver. (x86/amd64 platforms only).

There is also a webrev with the code.

This driver supports (in theory) a large number of cards from Creative. (Devices identified in prtconf -vp as "pci1102,2", "pci1102,4", and "pci1102,8".) I've not tested many of them though -- only the SB0100, CT4670, SB0310, and SB0360 have been tested, and I've been unable to verify SPDIF or expansion box functionality, but it should work.

To test, you'll need Boomer, which means build 115 of OpenSolaris or newer. I've only tested with build 124, and I recommend using 124 or newer if possible.

If you test it, I'd like to see the output from "cat /dev/sndstat", and as much testing of inputs and outputs (try different mixer controls, as well!) as you can. I'm hoping to integrate this code into Nevada in the next week or so.

Thursday, October 15, 2009

hme shrinks by about 40%

I just removed about 40% of the code from "hme", by converting it to use the common MII layer. It also makes it use Brussels, and fixes an old bug relating to 10 Mbps functionality. Another net negative lines of code integration for me. I wonder if this confuses's accounting?

Friday, October 9, 2009

OpenSolaris on snv_124 Impressions



