Thursday, March 01, 2007

Solaris, qemu and audio

After proper load of network driver, there is still one thing to do in Solaris + qemu – audio is defunct. According to Solaris HCL, audio1371 is for es1370 hardware (pci1274,5000). You can obtain a copy of audio drivers from tools.de site. After bunzipping, you can pkgadd -d it. Note, that you need only TOOLSSbpro driver, so that you may tell the installer not to install all the drivers from the package.

The next obvoius thing is to add_drv -i '"pci1274,5000"' audio1371, touch /reconfigure and reboot. Enjoy the audio :).

Solaris, qemu and network

When I was playing with Solaris 9 under qemu, I needed to install driver for network adapter (the default ne2k_pci). Rtl8139 neither other options doesn't seem to work not even in linux. Lspci says nothing when -net nic,model=<anything but ne2k_pci> is used in linux, the same result for prtconf in Solaris.

To get it right I've tried nei driver without success. Next thing I was told to test by google (and maybe Solaris HCL) was ni driver from this page. And it works, despite it's marked as beta. (You would propbably need to add_drv -i '"pci10ec,8029"' ni to add the driver, touch /reconfigure to tell Solaris to recheck hardware and reboot. Remember to create /etc/hostname.ni0 and /etc/dhcp.ni0 if you want to use dhcp client on this adapter (as you want to on qemu).

Just a note, use ls more than I. I installed gcc and make and after that I figured out, that there is already a binary driver in i386 (alias obj) dir. So you don't need to compile anything, if you don't want to.

Friday, February 02, 2007

Nasty bug

I've been playing for a six or so hours with one tiny bug. I was working on the high speed network adapter NetBSD driver and underlying PowerPC didn't want to send packet chain longer than one. Tons of messages in dmesg, many tries to debug DMA S/G transfers without anything reliable in return.

Finally I found out, how I'm stupid. I always set the end of the queue as transfer tail – send from end to end instead of send from this point to end. Aaargh.

I'm just curious, if there is any way to solve such issues not in so many hours.

Monday, January 29, 2007

NetBSD network stack

I'm playing with network stack in NetBSD and as a product I've released nettest – the test LKM to get familiarized with the stack. It's simple, it receives packets from userspace and sends them to the another interface and bpf listeners (tcpdump for instance). Everything is on my homepage.

It also contains examples of list queues use and deferred work. Everything in one short file.

Saturday, January 20, 2007

Qemu is nice

Finally I've time to try it out. It works just fine, especially with kqemu – a kernel module for speedup.

I tried 3 systems till now: Windows XP 32bit, Netbsd 3.1 and Solaris 9. No problem with installing Solaris and Windows. The NetBSD dislikes kqemu module – it spits out a 'Warning: no /dev/console' and hangs when trying to boot installation iso. The (simple) solution is to add -no-kqemu to the qemu command-line (even for standard booting of installed system, otherwise it won't boot with no warning).

Going to test it all harder :). First thing I took a note is the processor load; it's low, at least I expected it to be more hardware exacring.

Sunday, January 07, 2007

Quotation

Rodiče dřou děti sportem a muzikou, matematiku považují za týrání.
-- Jaroslav Král (origin, probably not the author)

(Sth. like parents force children to do sports and music, maths is considered as torture.)

Set it in stone :).

Thursday, January 04, 2007

ALSA stoop

I finally got my 5.1 speakers work in linux properly with this asoundrc file:

pcm.p6 {
type route
slave.pcm surround51
slave.channels 6
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
ttable.0.4 0.4
ttable.1.4 0.4
ttable.0.5 0.2
ttable.1.5 0.2
}
And then for example aplay -D plug:p6 <soundfile> plays the sound in all speakers. In xine I have settings which produces original AC3 sound into all speakers by default (I've set nothing) if available.

I had no idea about how asoundrc files works, I needed to study it and went through /etc/alsa stuff to understand it. Now, the life with ALSA is easier :). Let me note, that I have an emu10k1 card (creative sb live!) with analog genius speakers.