From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - Don't be too specific for conflicting boost ctl names Date: Thu, 19 Dec 2013 12:21:38 +0100 Message-ID: References: <1387388362-1005-1-git-send-email-tiwai@suse.de> 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 F22C4265350 for ; Thu, 19 Dec 2013 12:21:38 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Raymond Yau Cc: ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org At Thu, 19 Dec 2013 17:54:40 +0800, Raymond Yau wrote: > > When a boost control influences on multiple input paths, we shouldn't > > pick up the name string specific to one input but rather choose a more > > generic name. A problem seen often is that a single mic boost > > controls both internal and external mics although the driver picks up > > the very first name randomly like "Internal Mic Boost". This should > > have been "Mic Boost", instead. > > > > This patch tries to correct that behavior: when a boost control is > > available, check whether it conflicts with other inputs. If it does, > > use a common string ("Mic", "Line") as long as possible, or take a > > generic name "Input". > > > > + > > > /* create a boost control */ > > + if (!conflict) { > > + pfx = spec->input_labels[idx]; > > + idx = spec->input_label_idxs[idx]; > > + } else { > > + pfx = input_type_labels[type]; > > + idx = input_type_idxs[type]++; > > + } > > + > > snprintf(boost_label, sizeof(boost_label), > > - "%s Boost Volume", spec->input_labels[idx]); > > - if (!add_control(spec, HDA_CTL_WIDGET_VOL, boost_label, > > - spec->input_label_idxs[idx], val)) > > + "%s Boost Volume", pfx); > > > > should "Boost Volume" change to "Boost Capture Volume" if loopback path not > exist ? If the loopback doesn't even exist, why to bother? Takashi