From: Takashi Iwai Subject: Re: [alsa-cvslog] alsa-kmirror: ALSA kernel mirror repository branch, master now at v1.0.21-334-g6739046 Date: Thu, 12 Nov 2009 12:04:32 +0100 Message-ID: References: <20091112095403.1CAAE103807@alsa0.perex.cz> 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 (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 5B86A103938 for ; Thu, 12 Nov 2009 12:04:32 +0100 (CET) In-Reply-To: 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: perex@perex.cz Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 12 Nov 2009 11:39:12 +0100, I wrote: > > At Thu, 12 Nov 2009 10:54:02 +0100 (CET), > noreply-git@alsa-project.org wrote: > > > > commit 6739046df36c7adf80c961bcba4870270e66dbf6 > > Author: Jaroslav Kysela > > AuthorDate: Thu Nov 12 10:15:48 2009 +0100 > > Commit: Jaroslav Kysela > > CommitDate: Thu Nov 12 10:51:48 2009 +0100 > > > > ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping > > > > This patch adds support for dynamically created controls to proc codec file > > (Control: lines). > > > > Signed-off-by: Jaroslav Kysela > > > > commit c45b73bf328cd8ace53cf39994328cf9d6548c4f > > Author: Jaroslav Kysela > > AuthorDate: Wed Nov 11 13:43:01 2009 +0100 > > Commit: Jaroslav Kysela > > CommitDate: Thu Nov 12 10:51:16 2009 +0100 > > > > ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment > > > > This is an initial patch to show universal control<->NID assigment in > > proc codec file. The change helps to debug codec related problems. > > > > Signed-off-by: Jaroslav Kysela > > I find the second one is the nice hack, but the first (newer) one > isn't good since it abuses the subdevice field of the ctl id. > It is a part of API/ABI, and if we do any changes the semantics, we > should define the changed behavior *beforehand* publicly. BTW, I don't mean that using subdevice is wrong. Instead: if we use it, let's define the proper definition first. For example, define (1 << 31) as the private (driver-specific) field bit in control.h. Actually, using the subdevice can make the change of snd_hda_add_ctl easier, too. Then you don't keep nid in another field but just use snd_kcontrol to retrieve the nid. Of course, we'd need to check the existing apps (at least our own) whether subdevice is really safe to change freely, though. thanks, Takashi