Skip to contentSkip to conversation

how to handle bt848 audio driver

DISCUSSION Trent Piepho 3 participants 4 messages Oct 25, 2007 – Oct 30, 2007

lore
Share & tools
lore
#0 lore raw

I've made some more patches for the ALSA bt87x audio driver to support more features of the Osprey 440 card.

In order to support certain features, the ALSA driver needs access to the bt878's GPIO lines and I2C bus. These are controlled by PCI function 0, which is driven by the V4L driver. The bt878 DVB driver (which drives PCI function 1 just like the ALSA driver) needs to do the same thing and there is already some code to handle it.

So, the ALSA driver (snd-bt87x) needs to use functions from the V4L driver (bttv). As it is now, the two drivers are completely separate and don't share any code and can be loaded individually.

The DVB driver in the same tree as bttv, so this isn't a problem. But the snd-bt87x is in another tree, so it's somewhat harder, and I'm not sure what to do about it.

The driver will need some header files from the bttv directory. I guess this can be handled by adding a -I flag in the Makefile, though that seems a little ugly.

The bigger problem is that changes to snd-bt87x will depend on changes to bttv. How can the ALSA build system handle this?

For instance, my patch to add a digital volume control to snd-bt87x requires a new function to be exported from bttv. How will ALSA build snd-bt87x if the kernel source doesn't yet have this function?

#1 lore raw
Quoted 9 lines · Trent Piepho

I've made some more patches for the ALSA bt87x audio driver to support more features of the Osprey 440 card.

In order to support certain features, the ALSA driver needs access to the bt878's GPIO lines and I2C bus. These are controlled by PCI function 0, which is driven by the V4L driver. The bt878 DVB driver (which drives PCI function 1 just like the ALSA driver) needs to do the same thing and there is already some code to handle it.

Quoted 7 lines

So, the ALSA driver (snd-bt87x) needs to use functions from the V4L driver (bttv). As it is now, the two drivers are completely separate and don't share any code and can be loaded individually.

The DVB driver in the same tree as bttv, so this isn't a problem. But the snd-bt87x is in another tree, so it's somewhat harder, and I'm not sure what to do about it.

The part of the ALSA API used by snd-bt87x is apparently more stable than the bttv functions to be used, so this seems to be a good opportunity to move snd-bt87x into the V4L tree.

Regards,
Clemens

#2 lore raw
Quoted 5 lines · Clemens Ladisch
Quoted 4 lines · Trent Piepho

So, the ALSA driver (snd-bt87x) needs to use functions from the V4L driver (bttv). As it is now, the two drivers are completely separate and don't share any code and can be loaded individually.

Quoted 7 lines
Quoted 3 lines

The DVB driver in the same tree as bttv, so this isn't a problem. But the snd-bt87x is in another tree, so it's somewhat harder, and I'm not sure what to do about it.

The part of the ALSA API used by snd-bt87x is apparently more stable than the bttv functions to be used, so this seems to be a good opportunity to move snd-bt87x into the V4L tree.

What do you say about this Mauro? From my perspective, it would be much easier if all the bt848 drivers were in the same tree.

#3 lore raw
Quoted 18 lines · Trent Piepho
Quoted 5 lines · Clemens Ladisch
Quoted 4 lines · Trent Piepho

So, the ALSA driver (snd-bt87x) needs to use functions from the V4L driver (bttv). As it is now, the two drivers are completely separate and don't share any code and can be loaded individually.

Quoted 7 lines
Quoted 3 lines

The DVB driver in the same tree as bttv, so this isn't a problem. But the snd-bt87x is in another tree, so it's somewhat harder, and I'm not sure what to do about it.

The part of the ALSA API used by snd-bt87x is apparently more stable than the bttv functions to be used, so this seems to be a good opportunity to move snd-bt87x into the V4L tree.

What do you say about this Mauro? From my perspective, it would be much easier if all the bt848 drivers were in the same tree.

From my side, this makes sense.

Signature · 4 lines
Cheers,
Mauro Carvalho Chehab
http://linuxtv.org
[email protected]