[alsa-devel] asihpi - hwdep
tiwai at suse.de
Sat Feb 23 11:46:27 CET 2008
At Sat, 23 Feb 2008 20:41:48 +1300,
Eliot Blennerhassett wrote:
> Thanks Lee,
> On Saturday 23 February 2008 13:52:13 Lee Revell wrote:
> > On Fri, Feb 22, 2008 at 4:10 PM, Eliot Blennerhassett
> > <linux at audioscience.com> wrote:
> >I just don't know enough
> > > about how to start on hwdep implementation.
> > Please take a look at snd_emu10k1_fx8010_ioctl in
> > alsa-kernel/pci/emu10k1/emufx.c for examples of hwdep ioctl usage.
> that wasn't too hard. I have implemented stubs just to see how it fits
> It doesn't do quite what I want. The existing HPI ioctl has one device file
> for the driver, whether one or sixteen cards are installed, and its name
> doesn't change depending on the card index. (I.e. userspace accesses the
> whole (HPI) audio subsystem through the one /dev/asihpi)
> ALSA makes one device file per card, and the file name depends on the card
> index. Is there any way I can make a single device for the driver that has
> an unchanging name (preferably /dev/asihpi)
Unfortuantely, the hwdep doesn't work for such a purpose. It's
strictly bound to a specific card instance.
As HPI is a global control, this looks like an exceptional case.
Normally, the driver data is bound to the device as 1:1.
Maybe, the basic question now is which is the primary driver instance,
asihpi or hpimod. I feel asihpi could be better as the primary
driver (like other drivers), and we can add HPI interface as a kind of
hook. Well, this is an internal implementation detail after all, and
can be changed gradually.
More information about the Alsa-devel