From: Takashi Iwai Subject: Re: asihpi - hwdep Date: Sat, 23 Feb 2008 11:46:27 +0100 Message-ID: References: <200802221226.59326.linux@audioscience.com> <200802231010.59448.linux@audioscience.com> <75b66ecd0802221652s6dd2a56fye01616b5e17c93aa@mail.gmail.com> <200802232041.48913.linux@audioscience.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mail.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 5A94224618 for ; Sat, 23 Feb 2008 11:46:28 +0100 (CET) In-Reply-To: <200802232041.48913.linux@audioscience.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Eliot Blennerhassett Cc: alsa-devel@alsa-project.org, Lee Revell List-Id: alsa-devel@alsa-project.org 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 > > > > 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 > together. > > 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. Takashi