From patchwork Tue Dec 22 18:27:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 7906471 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3E5939F350 for ; Tue, 22 Dec 2015 18:30:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63CCD2053C for ; Tue, 22 Dec 2015 18:30:42 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id E8B89204DE for ; Tue, 22 Dec 2015 18:30:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 864832661B0; Tue, 22 Dec 2015 19:30:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3FEE5265D92; Tue, 22 Dec 2015 19:28:14 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E0E1E265D97; Tue, 22 Dec 2015 19:28:12 +0100 (CET) Received: from mail1.bemta3.messagelabs.com (mail1.bemta3.messagelabs.com [195.245.230.165]) by alsa0.perex.cz (Postfix) with ESMTP id 28993265AB6 for ; Tue, 22 Dec 2015 19:27:56 +0100 (CET) Received: from [85.158.137.19] by server-5.bemta-3.messagelabs.com id AE/88-07651-C2699765; Tue, 22 Dec 2015 18:27:56 +0000 X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-9.tower-39.messagelabs.com!1450808875!13475883!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8093 invoked from network); 22 Dec 2015 18:27:55 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-9.tower-39.messagelabs.com with AES128-SHA encrypted SMTP; 22 Dec 2015 18:27:55 -0000 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.248.2; Tue, 22 Dec 2015 18:27:55 +0000 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22379) id 262793FB48; Tue, 22 Dec 2015 18:27:55 +0000 (GMT) Message-ID: <7413a3e6c9996d2ae4c17ea60b220ad1d4012a9f.1450807642.git.Adam.Thomson.Opensource@diasemi.com> In-Reply-To: References: From: Adam Thomson Date: Tue, 22 Dec 2015 18:27:55 +0000 To: Mark Brown , Liam Girdwood , Takashi Iwai , Jaroslav Kysela , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Support Opensource Subject: [alsa-devel] [PATCH 5/6] ASoC: da7219: Add support for 1.6V micbias level X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" 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 X-Virus-Scanned: ClamAV using ClamSMTP HW can provide 1.6V micbias level as well the existing levels already provided in the driver. This patch adds support for 1.6V to the DT binding. Signed-off-by: Adam Thomson Acked-by: Rob Herring --- Documentation/devicetree/bindings/sound/da7219.txt | 2 +- include/sound/da7219.h | 3 ++- sound/soc/codecs/da7219.c | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/da7219.txt b/Documentation/devicetree/bindings/sound/da7219.txt index 062a2a0..cf61681 100644 --- a/Documentation/devicetree/bindings/sound/da7219.txt +++ b/Documentation/devicetree/bindings/sound/da7219.txt @@ -29,7 +29,7 @@ Optional properties: - clock-names : Clock name string for 'clocks' attribute, should be "mclk". - dlg,micbias-lvl : Voltage (mV) for Mic Bias - [<1800>, <2000>, <2200>, <2400>, <2600>] + [<1600>, <1800>, <2000>, <2200>, <2400>, <2600>] - dlg,mic-amp-in-sel : Mic input source type ["diff", "se_p", "se_n"] diff --git a/include/sound/da7219.h b/include/sound/da7219.h index 307198b..02876ac 100644 --- a/include/sound/da7219.h +++ b/include/sound/da7219.h @@ -16,7 +16,8 @@ /* Mic Bias */ enum da7219_micbias_voltage { - DA7219_MICBIAS_1_8V = 1, + DA7219_MICBIAS_1_6V = 0, + DA7219_MICBIAS_1_8V, DA7219_MICBIAS_2_0V, DA7219_MICBIAS_2_2V, DA7219_MICBIAS_2_4V, diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 5daeec8..c019fef 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -1410,6 +1410,8 @@ static enum da7219_micbias_voltage da7219_of_micbias_lvl(struct snd_soc_codec *codec, u32 val) { switch (val) { + case 1600: + return DA7219_MICBIAS_1_6V; case 1800: return DA7219_MICBIAS_1_8V; case 2000: @@ -1571,6 +1573,7 @@ static void da7219_handle_pdata(struct snd_soc_codec *codec) /* Mic Bias voltages */ switch (pdata->micbias_lvl) { + case DA7219_MICBIAS_1_6V: case DA7219_MICBIAS_1_8V: case DA7219_MICBIAS_2_0V: case DA7219_MICBIAS_2_2V: