From patchwork Wed Apr 22 09:55:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 227306 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26C5DC55189 for ; Wed, 22 Apr 2020 10:09:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F308F20882 for ; Wed, 22 Apr 2020 10:09:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587550163; bh=N+GGMNKW/JFvjmBMb+4QP9mEOUrcme01ULE5WsNGBmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Uy4rCuGtES5g9KxVXJekV+odZUM7VFHPKfLbPLVKNDJsnxqu3nUbnM+6xFJ/HJzxd 0+fEJmNkbnU3wY3ZRYYCbkrJg6LkRo39DEs5f6DjoPODcld9AJu6rkraB6No8PaHGf DF6Ew6n0pN5oX4yzyNtcg1vqJTcsrsM3UnfkElDU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728861AbgDVKJV (ORCPT ); Wed, 22 Apr 2020 06:09:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:35994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728857AbgDVKJU (ORCPT ); Wed, 22 Apr 2020 06:09:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D15E620780; Wed, 22 Apr 2020 10:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587550160; bh=N+GGMNKW/JFvjmBMb+4QP9mEOUrcme01ULE5WsNGBmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O6OnNFn4dkjNEmU/+XRNV5g3mZ/Gxf+PpqG19SKcqDsmz5RE7oCPvKSSKpvDBm0CS 1SA/S/4YJAWS9Tm9lF/nrKf4SbQQoJlh0fSxDtI7V4w7h9MXnRD/aI5Pt5qyAfzPFk njkTUBSVBcbBaQ9DWSIOIV0A9iadsc1ZQXwm2Cmc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gyeongtaek Lee , Mark Brown Subject: [PATCH 4.14 033/199] ASoC: dapm: connect virtual mux with default value Date: Wed, 22 Apr 2020 11:55:59 +0200 Message-Id: <20200422095101.374764409@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200422095057.806111593@linuxfoundation.org> References: <20200422095057.806111593@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: 이경택 commit 3bbbb7728fc853d71dbce4073fef9f281fbfb4dd upstream. Since a virtual mixer has no backing registers to decide which path to connect, it will try to match with initial state. This is to ensure that the default mixer choice will be correctly powered up during initialization. Invert flag is used to select initial state of the virtual switch. Since actual hardware can't be disconnected by virtual switch, connected is better choice as initial state in many cases. Signed-off-by: Gyeongtaek Lee Link: https://lore.kernel.org/r/01a301d60731$b724ea10$256ebe30$@samsung.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-dapm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -799,7 +799,13 @@ static void dapm_set_mixer_path_status(s val = max - val; p->connect = !!val; } else { - p->connect = 0; + /* since a virtual mixer has no backing registers to + * decide which path to connect, it will try to match + * with initial state. This is to ensure + * that the default mixer choice will be + * correctly powered up during initialization. + */ + p->connect = invert; } }