Blog structure changes

April 20th, 2009

Hi folks,

I have decided to write all new blog entries as pages instead of posts. So you will find the most up to date information under the pages section in the right side bar. The earlier posts (below) are more or less outdated.

No job no cry

March 20th, 2009

I was supposed to get employed by a company in the near future. Unfortunately this appeared to be a no-go. The company is laying out their former employees who will have priority in any open positions inside the company. Sorting out all this would take months so apparently I cannot get this job before next year or so.

I had a chat with Dev few moments ago. We decided to continue 4Front in the current way as long as possible. However this means that I will have to focus more on Boomer since Sun is still our only paying customer.

Now my plan is that I will work with the Boomer team trying to find out if there are any incompatibilities between Boomer and OSS4. If they can be fixed then OSS will benefit too. Solaris is one of the few Unix variants still left. It has very good market penetration so Boomer is going to be a big player (maybe bigger than OSS in the next few years). This should guarantee that developers of audio applications will fix their OSS/Boomer plugins. This in turn will result in larger number of applications that will work reliably under OSS4 too.

What comes to OSS4 there is not that much to do. The API is complete and frozen so it doesn’t need that much work. Some of the drivers (USB, HDA and X-Fi) suck but there is nothing that can be done without help by highly skilled contributors. I will continue hacking on the features I see personally interesting. However significant steps forward can only be accomplished with help by volunteers.

I have done some hacking on the Cuckoo module that makes it possible to use ALSA on top of the drivers provided by OSS. In this way OSS users can use Gnome sounds and other applications that are currently only available for ALSA. At the same time it’s possible to use native OSS applications. There is no emulation and both APIs should work in 100% compatible ways.

Future of OSS

March 13th, 2009

Hi all,

I know many of you have been worried about the future of OSS. End of the last year has been very hard to me for both family and professional reasons. Some of my earlier blog postings have been very bitter. I was just badly depressed and burnt out. However the situation is much better now.

There are three main problems with OSS at this moment

  1. Nobody is paying anything for “free” software. This means that full time “professional” development of “free” software is impossible in long run (see below).
  2. The current sound card architectures like USB, FireWire, HDaudio and X-Fi are all bogus. They all are extremely complicated and will require man months or years of work to be supported properly. There is no way that a two man company could get drivers done before they get replaced with something else (that will probably be even lamer than the current technologies).
  3. Practically all legacy OSS/Free applications are seriously broken. They may have worked just fine in earlier versions. However it looks like both OSS/Free and ALSA’s OSS emulation are broken and developers of applications should have developed workarounds for the bugs in the drivers. It looks like all OSS applications try desperately to avoid blocking (instead of using normal read/write). This makes me to suspect that normal blocking read/write doesn’t work in OSS/Free and/or ALSA.

Getting the applications fixed seems to be “mission impossible”. It is relatively easy to do the required changes to most of the applications. However it is impossible to get the changes included in the official versions of them. In many cases it’s impossible to find out who maintaisn the application. In the other cases the maintainers don’t care to answer. Is there any point in trying to develop reliable audio subsystem when all applications bypass documented OSS and try to do everything on their own.

I will probably start in a new job within next couple of weeks. This job will be kernel development but not related with OSS. This is all I can disclose at this moment. However this doesn’t mean that I stop developing OSS. Not at all. Getting a full time job outside OSS is just better way than any of the other alternatives. It removes the economical risks and I can focus on doing actual work instead of worrying about the economy side all the time. The other alternative is doing some side business (selling OSS T-shirts or trying to invent some web2.0 service) to fund development of OSS. However this will simply not work. The economical risks in the side business are even higher than in the OSS business itself.

I will continue working on OSS in the following ways:

  1. I will continue as the maintainer of the development version of OSS (currently 4.2).
  2. I will do OSS related development on contract if some customer wants to pay. This includes drivers for new sound cards, adding new features to OSS and also development of custom applications.
  3. There are earlier commitments like our contract with Sun.
  4. Hacking “just for fun”. I will continue working on OSS features I need myself and features I see interesting in other ways.

I will continue the co-operation with 4Front Technologies almost as before. 4Front Technologies will continue to sell and support OSS as before. The only thing that has changed is that I no longer commit to fix any technical support problems overnight in particular if they require installing given version of Linux/Solaris to machine with given CPU/chipset and sound card. I tried to do this for 13 years until I figured out that I cannot continue working in that way. So 4Front Technologies will continue direct technical support to their customers and I will help Dev as well as I can.

I have recently been working on a new ossxmix program. This work will probably take few months. In addition I have been working on a driver for RME HDSP MADI/AES32 (the driver is now ready but the contract with the company that funded the driver doesn’t permit releasing it before June). Other work I plan to do in the nearish future is fixing MIDI support and improving compatibility with ALSA (the Cuckoo project).

However what I will probably NOT do are:

  • Fixing the USB audio driver. The current driver kind of works under Solaris and Linux. However it is not as good as it should. Also it doesn’t work under any other operating system than Linux and Solaris. The problem is that all operating systems have different and incompatible USB core/framework/DDK. Also the USB audio spec is more or less bogus. The result is that the amount of work required to implement a proper USB audio driver is enormous. I could probably do it in about 6 months if doing full time work. However it’s likely that USB will be replaced by some other technology before I can get the driver done on my spare time.
  • Also fixing the HDaudio driver is something I don’t plan to do. The original HDaudio codec spec is simply all bogus. The goal of HDA was to let one driver to work with different HDA codecs without modification. However the spec gave free hands to the hardware manufacturers. The result is that every single laptop and motherboard seems to require dedicated hand written driver to work (earlier we had just few chipsets to support but not 1000’s of them). Microsoft’s UAA architecture might provide one way out since all laptops/motherboards need to follow it to get the “Vista compatible” sticker. Unfortunately it seems to be impossible to figure out the exact “path finding” algorithm used by UAA. So why to try when there is no chance to get the driver working any better than now.
  • SB X-Fi is one of the last new consumer sound cards in the market. It has impressive feature list on paper. Unfortunately the EMU 20k chip is extremely complex. It has dozens of different processing units connected by a freely reconfigurable ring bus. In addition it has a DSP unit that is completely documented.  Also different X-Fi cards have different peripheral chips connected to the 20k chip. Figuring all that out seems to be somethinmg that may take few years of full time work. In addition keeping track of the changes in recent/future card models makes the driver a moving target. The current X-Fi driver of OSS is based on a simple DOS based manufacturing test program provided by Creative. It supports only older card models and limited functionality. Unfortunately this seems to be the best that can be done unless we manage to hire a group of 5-10 sr driver engineers to do the job.
  • I have already found it impossible to get the legacy OSS applications fixed.

This is all this time.

Boomer

March 13th, 2009

Hi all,

Sun has published more details about Boomer that is their implementation of OSS4. Boomer is a hybrid based on Sun’s older SADA (/dev/audio) code and selected parts of OSS4. It probides full SADA support in addition to the OSS4 API (OSS4 itself has more or less limited SADA support). In addition Boomer supports many Solaris specific features such as fault management (FMA) that are not supported by OSS (yet).

Boomer is based on Sun’s existing low level drivers. Also large parts of the framework comes from Sun. This is OK. However there is some risk that Boomer behaves in slightly different way than OSS. My understanding is that applications written for OSS4 should work under Boomer out of box. However I suspect that applications written for Boomer may not work with our OSS4 implementation in all cases.

There are few main differences that may cause problems:

  1. Boomer doesn’t implement SNDCTL_DSP_SETFRAGMENT and application selectable fragment/buffer size that is preferred way for controlling latencies in OSS4. This should not be a problem in most cases since Boomer uses reasonably short fragment size. However there are special applications that would require very short fragments to work.
  2. Boomer makes the /dev/mixer API available to “ordinary” applications. OSS4 in turn bans use of the MIXER API from “ordinary” applications that use /dev/dsp too.
  3. The Boomer mixer API spec also tells that applications can use predefined control names (such as Mic, Line or whatever) for predefined purposes. OSS4 doesn’t have any predefined names and applications should handle the mixer API fully transparently. In OSS4 mixer control names are only meaningful to the user. The application should just show all the controls to the user and let him/her decide what they mean.
  4. Boomer has “flat” mixer interface. All mixer controls are in the same level. OSS4 in turn has hierarchical mixer structure where controls are organized as a tree.
  5. There may be places where Boomer differs from OSS unintentionally. Boomer has been tested with “legacy” OSS applications that have been written to be bug compatible with OSS/Free and ALSA’s OSS emulation. Unfortunately most of these applications use extremely complicated and brain dead non-blocking/timing strategies that make them very unreliable. OTOH Boomer should also have been tested with OSS4 applications such as osstest and ossplay/record so the situation should be under control.
  6. Boomer doesn’t implement many of the optional ioctl calls of OSS. This should not be a problem because they are listed as optional in the OSS4 API spec.

After all I don’t expect any major compatibility problems between OSS4 and Boomer. The audio API’s are supposed to be identical. The mixer API (ioctl calls) itself are identical too. However the way how Boomer implements the actual mixer behind the API is different. Possible compatibility problems can be avoided very easily. Applications just should continue to avoid using the mixer API even Boomer’s documentation says they can use it.

Sorry for unapproving all recent comments!

March 13th, 2009

Sorry guys!

This blog gets about 2000 spam comments each month. I found it impossible to screen all of them to approve few real comments. In particular this seems to take more and more time since recent spam messages look like real messages instead of just collections of hyperlinks to porn sites.

So I removed all 3700+ comments waiting for moderation. I will probably not be able to screen the comments any better in the future. My intention is not to censor your comments. I just have better ways to spend my spare time than by reading all kind of junk sent by bots.

To get your comments approved you should include something that gets my attention in less than a second. Something that shows that the comment has been written by some human being who knows what he/she is talking about. Comments that have no interesting keywords in them are likely to be ignored. Also comments that have hypertext links will probably get deleted unless there is something else that raises my attention. You need to say something that shows that you are talking about the subject of this blog, it’s scope or it’s competitors.

Hacking continues

December 15th, 2008

Hi all,

Sorry the long delay since my last post to this blog. Moderating all the junk in the comments posted to this site has just been too frustrating. Every month there are about 1000 comments and only about one of them are valid comments. All the others are just spam posted by some robots that hover over all blog (WorldPress) sites. Today I spent an hour on moderating more than 5000 comments. Just about 6 of them looked valid. This means that I had to inspect each comment in less than a second. So only the comments that had some magic word on them picked my attention. All the rest got moved to /dev/null. I’m sorry if some valid comments didn’t get treated properly.

I have been (more than a) bit disappointed because it still looks impossible or at least hard to continue development as a full time job (for living). We get some money from our contract with Sun. However this is all in USD and my expenses are in euros. The value of dollar has been very low when compared to euros. This means that dor every dollar I get only half of euros when compared to the situation about 8 years ago. This is getting improved but who knows what happens in the near future. There have been two OSs related customer projects I have done in euros. Unfortunately there are no other projects in sight.

The situation with Sun irritates me. They have forked their very own Solaris-only OSS thread instead of taking OSS as-is (that was my plan). The OSS version to be included in Solaris will be radically different from our version. This means that it’s very unlikely that the improvements made to “stock” OSS will ever appear in Solaris.

However hacking on OSS continues. We have finished OSS v4.1 just few days ago. The source code for it is already available and the binary distributions will be released within next 4 to 5 weeks. In addition we have started developing the v4.2 version that will (at least) have MIDI support.

I’m still looking for a new job for my living. However I will continue developing OSS also in the future. I have lot of ideas to be implemented. Also the hdaudio and the USB audio/MIDI drivers need some rework. In the distant future the focus will be in features will be based on software. My plan is to add features that make it possible to feed/mix audio signals betwen different sound cards. In addition I have some plans for an application/library level subsystem that makes it possible to use large number of applications together.

Thank you for your co-operation

September 11th, 2008

It’s becoming clear that I will no longer be able to make my living by developing OSS. The only paying customer we still have is Sun. Due to the massive size difference between 4Front and Sun this deal is getting impossible. It’s much like a cat playing with a mouse. The mouse can live as long as the cat wants to play with it. As the mouse I don’t have any other choice but to escape before the cat gets bored. And it looks like Sun may not need 4Front any more after they have forked their own version of OSS.

There doesn’t seem to be any plan B. Linux/Unix software is supposed to be free which also means gratis and royalty free. There is no market for OSS related consulting and custom (driver) development. The only alternative left is to go and sell my ass to fund development of OSS.

I’m 46 years old. There is still 20 years left before I can retire. Every day it will become more and more difficult to find a new job. It might be possible that we can continue working on OSS for few more months or years. However I don’t see it possible to wait until the final end. I need to find another job.

I will continue working on OSS on my spare time. However it’s impossible to predict how much spare time there will be in the future.

The Bazaar & the Mosque

May 28th, 2008

All open source people (should) know the “The Cathedral & The Bazaar” book by Eric S. Raymond published many many years ago. In this paper he presented the difference between closed source (proprietary) “cathedral” development model and the Linux-like “bazaar” one. In the bazaar model you are supposed to have freedom to pick any “free / Open Source Software (FOSS)” and use it. Sounds good but does this have anything to do with reality? No.

Note that I’m talking about “ordinary” users who don’t know how to compile, install and hack software packages downloaded from the net. Power users have the required skills to do whatever they want. However how many typical computer users have ever heard aboutany computer programming languages? Typical end users can only use the services that are already available in their computer. In the best case they can install some precompiled applications if the installation procedure is easy enough.

In the Linux bazaar you can visit any of the shops and pick the Linux distribution provided by that vendor. However this is the last moment you can make any choises. After you have installed the Linux distribution you have got your freedom is gone.
If all the devices in your system are not supported by the distribution then you will be more or less out of luck. If the Linux version doesn’t support your chipset, network adapter, IDE/SATA chip and other critical hardware components they you will be out of luck. There is no way to get the Linux distribution you have selected to work in your system. You cannot install any additional drivers from the driver CD that comes with the system because there are no Linux drivers. You can only hope that some other Linux distribution supports your hardware or that the support will be included in the next update.

Even if you manage to get Linux installed you will be limited to the applications supported by it. You cannot install any 3rd party applications because you would have to compile them yourself which is beyond your skills. If you go and buy the very latest scanner (or whatever) device then it will not work before your Linux vendor releases a kernel update that supports it. You can possibly download the source code for your hardware from it’s manufacturer’s web page but will you be able to compile it? It depends on your skills and also on the freshness of the driver code (Linux kernel may have been changed between the driver and the kernel version you have). In any case you will have to install the driver development environment and tools for your distro (which may mean 100’s of megabytes of disk space.

How does this work in Windows?

When you install Windows you have an opportunity to install vendor provided drivers. You can install the drivers from the install CD that comes with your motherboard. You can also do the same with the install CD’s of your network and SCSI cards. Then you proceed to install Windows itself and the result will be a fully functional system.

Can you do this with Linux? 

The answer is no. When you install Linux (any distribution) you are not given any chance to install 3rd party drivers when you install Linux or even after that. You can install 3rd party drivers to Linux if you are a real hacker with years of Linux kernel experience. However for any “ordinary” Linux users this option is out of reach.

Is the bazaar really a bazaar?

After you have installed a Linux distribution (if you have managed to do so) you will become dependent of the support provided by the vendor of the distribution. You can install important updates released by the vendor or to upgrade to the later versions of the distribution. However if the vendor doesn’t see it necessary to support hardware or software you would need then you will be out of luck.

Experienced Linux hackers can always download whatever software they need and try to compile it themselves. However often they will end in never ending battle with differences between various kernel and library versions. The device driver interface of Linux seems to change between versions. This means that 3rd party drivers may require modifications before they compile, install and work with different kernel version. Even user land applications often depend on newer/older versions of various libraries than the ones provided by the distribution. You will have to download and recompile different versions of different libraries and to recompile them. Sooner or later you will be in a situation where some other applications stop to work because of wrong libraries. So to stay on solid ground you have to stick with whatever software/versions your Linux distribution vendor sees necessary to support.

Do you think this is the Bazaar? Are you sure you have not visited a Mosque instead of a Bazaar?

Advocates of “free software” often talk about “free beer” and “freedom of speech”. Have you ever heard anybody talking about “freedom of choice”. In the current situation there is very limited freedom of choice in Linux. You can (if you can) do this and that with Linux and the software installed under it. However this appears to be very difficult when compared to so callec “closed” operating systems like Windows or MacOS.

What suxx?

Once upon a time Linux had a relatively good device driver module interface (that was in the 1.2.x days). A driver compiled for some kernel version worked perfectly OK with several kernel versions after that. However things changed after Linux 2.0.0. It become more and more difficult to ship just one binary driver for all 2.0.x kernels. It appeared to be necessary to provide a wrapper module that was compiled for each kernel version. Each distribution introduced slightly incompatible kernels and soon the only way was to compile the wrapper in the customer system. That time it was easy because the driver development environment was installed by default by every distribution. Today even this is practically impossible because the kernel headers and the required tools (gcc, binutils, make, etc) are not installed in most systems.

Earlier our mistake was having OSS as a closed source product. Now we have open sourced OSS but nothing has improved. We still cannot provide precompiled OSS binaries that the customer could install out of box. The customer will have to install the kernel development environment (which consumes gigabytes of disk space) before he/she can install OSS. This requires significant amount of knowledge that most ordinary users don’t have. So only more or less experienced hackers will be able to install OSS.

Sooner or later OSS4 will become part of most Linux distributions. This will solve the problem. However this will take years. Even after that ordinary users will not be able to download the latest version of OSS from our site and install it out of box.

Is this the Bazaar or the Mosque? You decide…

The Dream World (TM)

Today you cannot take the very latest motherboard, network adapter, sound card or whatever and just install Linux to your system. The chances that you will be able to do this are minimal. In the best case you may be able to install some of the Linux distributions by using the noapic and noacpi options. However you will probably have to try several different Linux distributions just to find out that none of them work yet.

In (my) dream world you could take any Linux distribution and boot from it’s install CD/DVD. It will then ask you to insert the install CD’s that came with your motherboard and the add-on devices. After installing the vendor drivers the Linux installer continues. Few moments later you will have a Linux system that supports all the hardware you have got.

However this is not reality at this moment. None of the Linux distributions let you to install any 3rd party drivers. In fact developing 3rd party drivers that work in this way is completely impossible. There is no concept of precompiled binary drivers in Linux. Everything that is not included in the distribution itself would have to be recompiled on-site which requires gigabytes of disk space that is not available during the installation.

The problem is that Linux lacks a sane device driver (binary) interface like DDI in Solaris. It is totally impossible to distribute any precompiled kernel code (drivers) because Linux drivers depend on the deepest details of the given kernel image. I have proposed this kind of interface several times on the linux-kernel mailing list over past 12 years. However these guys don’t seem to like the idea. The current vendor-centric business model of Linux is not compatible with this idea. The current model is perfect for the current Linux players because they can make money by doing paid support for the customers who like to use new hardware. However for 3rd party players like 4Front Technologies this is an unbearable situation. Also the customers will suffer because their Linux vendor has pure monopoly to give any support to them.

Sorry guys!

May 28th, 2008

I spent past 30 minutes by deleting 400+ spam messages waiting for moderation. This means clicking the spam button 400+ times after taking a quick look at the messages. Unfortunately it sometimes happens that I delete valid replies. Today I may have happened twice.

My policy is not to delete replies even if they conflict with my opinions (unless they are total bullshit). If you find your postings don’t appear on the blog (within few weeks) then please try again. I may have accidently deleted your reply. However please note that I don’t have time to check the moderation queue too often. Usually I try to do it weekly but sometimes there may be weeks before I can check the queue again.

New business model for future OSS development

May 16th, 2008

Some months ago I realized that developing Open Sound System is no longer my profession. Nobody is paying to me so all OSS hacking has become just a hobby (just for fun). I make my living by doing contract development for Sun and very few other paying customers. However that doesn’t cover the work I have planned to do to develop OSS as an independent product for everybody. This means that my focus will be in keeping customers like Sun happy (by developing features they need) and in developing features what I like to do for my personal needs.

At the same time users of OSS are struggling with problems related with their (hdaudio) laptops. Fixing them will require hours or days of work for each system. In addition to do the work I would need to buy each laptop and pay it from my own pocket. Why should I do that when nobody is paying anything for OSS. Users of OSS seem to be just wanting free support from me without paying anything for that.

Recently I bought a decent iMac system because I decided to move from Windows to Mac (I’m a amateur photographer and use Photosshop a lot). I can use this machine to fix some OSS problems related with Mac machines but this is justified because I have other use for the machine. In addition I would like to use OSS under Solaris in this system myself.

However there are many OSS users with many different kind of laptops (Lenovo, Sony, Toshiba, etc). What should I do with them? Do I just go and buy all the laptops from my own pocket? No. I don’t need any more laptops for myself and in addition my salary is will not be enough to buy any more of them.

So what to do with users of such laptops. I don’t care. I don’t have any use for such laptops. Developing hacks for more hdaudio systems is even not fun (it’s lamest of all lame jobs). Should I just say fuck off to all these users? After all being nice to them will not improve my life in any way. I just have to waste my spare time in doing something I don’t want to do. By not doing that the competiveness of OSS will degrade. However does it really matter because I will have to find some other job anyway? Is this the only choice? I hope not.

What I have been thinking about is a new business model for OSS. If 100+ owners of some laptop (say Thinkpad T61) would like to donate something like $10 for the project then I can pay a T61 laptop and cover the required work by that money. In this way it will be profitable and I don’t need to cover the work from my just-for-fun time budget (which will never ever cover the price of a T61 laptop I don’t need). I just need to spend some additional time in developing an auction web site for this purpose (which is actually fun).

What do you think guys/galls? Comments are welcome.