Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1120807ybi; Wed, 17 Jul 2019 09:49:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxF7WjrhNM5bHiCnOdmdxWuz4J0zeh3kxQ3fdhlNsRrtgIGQViBJZ2x2wVsWnpq54uSX1Eg X-Received: by 2002:a17:90a:d58c:: with SMTP id v12mr44438685pju.7.1563382187070; Wed, 17 Jul 2019 09:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563382187; cv=none; d=google.com; s=arc-20160816; b=D5qfbW//jX/ao0yJwPgG7Ww2BpIn8k7tVQ3UZ+BW2UHrY2fBx4VVi9fGY/5dqFTum1 W2ovHh1x6fp3qiD0ERfnhL48MKS3fhLJSiPvvXQvgCtvWIQ3OXiqh1XG/36JARcQMpnM XmhdyO8s2yCmKqwxy2pZcMizmkgLjGyvDtD+7zzbqMjDUZg17xUGfojxERkxQ+JjbIY+ 1ztBG2nFr1BiLCO7/N7WljeRqVG8Ht8Y1JH5iC/qsnla80fPwM3TocvmSRhiscY/i26H V7lWTWT/fJKbc4KLig+S/8dg/k6QFti73LPd3lHHEG2v6ftmR1+nV8+FDE8W6yzegpTn MuoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NgGtrv5SKEz++WGnlB/B3rFdiXYpyY07rfhEUYiUwH8=; b=PoNizGGZ3iSOsH40U0x/cPh27Q8wROGH9fo3gKTIOea+MHwGUSjVwhgZEnHfH7olhH Z2fEAgTyflypOcxAK7j+t/NR8gpYdkS0tsELgIY8XAKpu4VQmHxiSttPbsTyZBfrF5yn ttWQgb8xlZ3GDGunjmELZXd3aWm9rEAxHhWlP5BByG0JPFxsyz4jUbNlDTMoV70ErBsS zO+w86JrZOKxjZO1QG7T+hBUshJun8EBoIscE06ZH19pgVpuI/eQbpd2UK+ds54ujz21 25Hd1KK0EOdxTgt+z/NDdbnw+O1mDv8iNCv/6PHdGykwRo5U2dfzTynxLnk09jYlT7K7 AABA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MhVx2YaE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23si23690672pff.103.2019.07.17.09.49.29; Wed, 17 Jul 2019 09:49:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MhVx2YaE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727294AbfGQQs4 (ORCPT + 99 others); Wed, 17 Jul 2019 12:48:56 -0400 Received: from mail-lj1-f181.google.com ([209.85.208.181]:43449 "EHLO mail-lj1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbfGQQsz (ORCPT ); Wed, 17 Jul 2019 12:48:55 -0400 Received: by mail-lj1-f181.google.com with SMTP id 16so24295290ljv.10; Wed, 17 Jul 2019 09:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NgGtrv5SKEz++WGnlB/B3rFdiXYpyY07rfhEUYiUwH8=; b=MhVx2YaEcVUQ11yWhLge7sp5/jqEHDI9LwX1f7kbBfbqaM7o3uiYPPGBZjkDAy2qUF c2ZVP3Uz525C/YSfM0Jy916Ikg4yFoUVyxsKxpHEjxl8UwoJ7xZJ3FcNetIJAYSdjJyb DEIJRDQkMixS7AirdetBhDeUGPd5AGMq7zsL47Cxfb62l64UhW+7xnQZMkzIvMz7HyZX n7V8cRrHES0dnhqOuAFOanJd1jKkQp3I/U6fI1jfbAaW4O+sy/yLdlQRe5Lx0BnycI0V Ntk1tJ7bUe9nP7mefHHpPRTm8e0wDeMbcCp8iTldKBkZLc9H0xp0tRis4ncsM77NI+M4 yEiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NgGtrv5SKEz++WGnlB/B3rFdiXYpyY07rfhEUYiUwH8=; b=JCsMxX8BoIJbDCwiDifWUBJL7J4gE0Pq9zI6XOoJRJv1mC0C06NRO05UY/tGwVBBW1 Ome6WpFsRE30OlxamWP0C44sa9MIul4ao4k2IkByfwFcuM2Y3Qm3xQv8EFZ2xUabeZOP sg/b5FqTb/wSDPrLRgBgKKDn51bci1yV8I7Eug/yVCuEY4N9INhu5mmEcgZSKi5GRJku 8sYfdgDqcQQHoUQG8xjxHICuO9J+k53lqTj5saAuQ2SlArAaG1FslAGTtnupIqyGSRpB foW2YsNXZPsXxL8a17dNSbn6Lw2VtCSvg48xChoIrRC7HM/IXPc+FQwuMTQrFeuO8PAu adEg== X-Gm-Message-State: APjAAAWNOWZ9g4unIFN3YuMsSq8YIQnRPOe/reMIlpWlbHqmMOTMujBe DM0KcfGKU1apuxO79btjwhH0Mq+s/jUK566+XCzjIe18 X-Received: by 2002:a2e:a311:: with SMTP id l17mr20837046lje.214.1563382133648; Wed, 17 Jul 2019 09:48:53 -0700 (PDT) MIME-Version: 1.0 References: <20190717163014.429-1-oleksandr.suvorov@toradex.com> <20190717163014.429-3-oleksandr.suvorov@toradex.com> In-Reply-To: <20190717163014.429-3-oleksandr.suvorov@toradex.com> From: Fabio Estevam Date: Wed, 17 Jul 2019 13:48:43 -0300 Message-ID: Subject: Re: [PATCH v4 2/6] ASoC: sgtl5000: Improve VAG power and mute control To: Oleksandr Suvorov Cc: "linux-kernel@vger.kernel.org" , Igor Opaniuk , Marcel Ziswiler , "alsa-devel@alsa-project.org" , Jaroslav Kysela , Mark Brown , "stable@vger.kernel.org" , Takashi Iwai , Liam Girdwood Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 17, 2019 at 1:30 PM Oleksandr Suvorov wrote: > > Change VAG power on/off control according to the following algorithm: > - turn VAG power ON on the 1st incoming event. > - keep it ON if there is any active VAG consumer (ADC/DAC/HP/Line-In). > - turn VAG power OFF when there is the latest consumer's pre-down event > come. > - always delay after VAG power OFF to avoid pop. > - delay after VAG power ON if the initiative consumer is Line-In, this > prevents pop during line-in muxing. > > Also, according to the data sheet [1], to avoid any pops/clicks, > the outputs should be muted during input/output > routing changes. > > [1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf > > Signed-off-by: Oleksandr Suvorov > Reviewed-by: Marcel Ziswiler > Fixes: 9b34e6cc3bc2 ("ASoC: Add Freescale SGTL5000 codec support") Reviewed-by: Fabio Estevam By the way, I prefer the description you put in the cover letter as it explicitly talks about a bug being fixed.