From: Takashi Iwai Subject: Re: Userspace control of HDA port connections Date: Fri, 21 Dec 2007 10:55:42 +0100 Message-ID: References: <76366b180712201345q2169cec2q40cbf5a40226a918@mail.gmail.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 mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 0827F24451 for ; Fri, 21 Dec 2007 12:59:28 +0100 (CET) In-Reply-To: <76366b180712201345q2169cec2q40cbf5a40226a918@mail.gmail.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: Andrew Paprocki Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 20 Dec 2007 16:45:09 -0500, Andrew Paprocki wrote: > > Takashi, > > I'm wondering if there is any interest in providing a userspace way of > modifying the HDA port/mixer input/output mappings? The driver > currently uses hard-coded models to define the standard configuration > for a given piece of hardware, but this doesn't allow a user to > redefine a line-in port as an output port if the chipset has an > available unmapped mixer. I'm bringing this up because from what I > understand of the ALC883 is that it has 4 mixers, yet on my > motherboard there are only 3 ports configured as output by default > (6stack-dig). Correct me if I'm wrong, but I should be able to map all > of the physical jacks as outputs and then assign each of the mixers to > a jack or more than one jack. That would require adding a new model to > the driver and/or unloading/reloading the module with a new model > string. In a system which has the driver built-in and isn't using > modules, this requires a reboot. If there was a userspace way of > reconfiguring the jacks (via /proc/asound?) then perhaps even all of > the hardware -> model mappings could be moved into a little tool run > at boot time which doesn't require a kernel change every time new > hardware is introduced. A nice little ncurses tool could even be made > to modify port mappings. What do you think? If I'm misunderstanding > the capabilities of the chips please let me know. It's not possible right now as is. I've once created a user-space setup tool for hda driver, but it was only for older versions and very unlikely works with the current version. You can find it at: ftp://ftp.suse.com/pub/people/tiwai/hda-tools/ I think the idea itself is OK, but the implementation must be more improved. The data transfer of variable length data via ioctl is basically a bad idea, and this could be better in a simple read/write stream. Also, the creation of mixer elements has some issues to reconsider. > Thanks, > -Andrew > > p.s. I still have yet to test out the multi-card patch. I'll reply to > that once I have more info. Yeah, let me know if it works. I think this should be merged to the upstream soon. Takashi