quinta-feira, fevereiro 09, 2006

ALSA driver effort

These past days was spent making alsa driver works for H2 board.
The original alsa driver was developed for OSK5912 board and was based in former ARM boards alsa driver and oss omap drivers. It is tied to tvl320aic23 TI stereo codec and mcbsp peripheral. This driver was release in later july and went into omap tree by september.
The task now involves porting the driver to H2 board which is populated with a TSC2101 TI codec chip which has more features than the aic23 and is aimed to cell phones and pdas.
Notwithstanding different boards and codecs, the new alsa driver would have to much in common to don't think of code reuse. Thus the initial approach was to separate hardware, codec in the case, in separate files and furthermore, to implement platform_data support. With the latter we can specify a structure that carries some info with respect to the board, to the driver, and make the proper initialization upon driver enabling or loading.
To achieve that a series of modifications was made in the aic23 alsa driver as follows:
-Extraction of codec dependent code from main alsa file,
-Which leads to the creation of codec alsa file for codec aic23
-Migration of specific codec data to platform_data
-Improvement of function probe in omap-alsa driver
-Test the aic23 in this new configuration
-Support for board H2
-Creation of codec alsa file for codec tsc2101 based in oss driver
-Audio tests for H2

Ok, that done, it was time to work in the mixer. The mixer was originally thought to fit this "hardware dependent model" as well, but tests and endless modifications took us to conclusion that mixer would be quite difficult to share a common structure between these two codecs, at least for this expectation of project time, let's say, two weeks.
At this moment of the project, Mika Laitio, came up with a patch in the omap list aimed to tsc2101 codec alsa suport but fot the iPAQ, which has some variant of the 1510 omap chip.
After some interaction both codes have evolved and we are now trying to join both approaches.

Nenhum comentário: