From patchwork Tue Dec 13 10:56:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 9472217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E41AD60760 for ; Tue, 13 Dec 2016 12:04:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC9FB284A5 for ; Tue, 13 Dec 2016 12:04:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDF7B285CC; Tue, 13 Dec 2016 12:04:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89D4A284A5 for ; Tue, 13 Dec 2016 12:04:40 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 56ECF266DDE; Tue, 13 Dec 2016 13:04:38 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9BFBA266DE2; Tue, 13 Dec 2016 13:02:19 +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 892E8266DA0; Tue, 13 Dec 2016 11:56:32 +0100 (CET) Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) by alsa0.perex.cz (Postfix) with ESMTP id 9DD73261A1A for ; Tue, 13 Dec 2016 11:56:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Message-Id:Date:Subject:Cc:To:From; bh=0W3VqG0mu2r8QbvfUGzxrgYRFN2jMoRFTGq63Q7MMCE=; b=MXC9ofd1DVpwMmJTX+BzBYgiSQV36hIwGDiHKToLNzFYaLOIlS4G2376w+rnhapbWUjv7p8DO4Fk5puaVMzKIkYXygaZFqGDn2FFXQzvS1UIrcdLxMJb5QCHvRwaiGDs2w1A4GuthCY16votUKfdvOsRwkcft2M7eyIZIMplLw4=; Received: from milas.spb.ru ([217.119.30.118]:37357 helo=shc.milas.spb.ru) by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1cGkl2-0007Q5-Bf; Tue, 13 Dec 2016 13:56:28 +0300 From: Alexander Shiyan To: alsa-devel@alsa-project.org Date: Tue, 13 Dec 2016 13:56:19 +0300 Message-Id: <1481626579-23642-1-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 2.4.9 Authentication-Results: smtp47.i.mail.ru; auth=pass smtp.auth=shc_work@mail.ru smtp.mailfrom=shc_work@mail.ru X-E1FCDC63: BBC6C790E50C2C4F4681DDCF0A41C943AD222422030090D9 X-E1FCDC64: A893264C37F1FB865F7540BF80E9F42ADC2ECF9A0A6EE374BB9EDE6B05BDE53F X-Mailru-Sender: 3DB79DE11BEE6A1C1617E94A9F14CF9C449A8B5B8D295F58D42187580043491D7928CDF279FCD4354C6784DEA8096F07 X-Mras: OK Cc: Alexander Shiyan , patches@opensource.wolfsonmicro.com, Takashi Iwai , Liam Girdwood , Mark Brown Subject: [alsa-devel] [PATCH] ASoC: wm8753: Add control to allow swapping HiFi DAC channels 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a control to allow swapping HiFi DAC Left/Right channels. Signed-off-by: Alexander Shiyan --- sound/soc/codecs/wm8753.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 9bdf544..d05d76e 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -280,6 +280,7 @@ static const DECLARE_TLV_DB_SCALE(voice_mix_tlv, -1200, 300, 0); static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0); static const struct snd_kcontrol_new wm8753_snd_controls[] = { +SOC_SINGLE("Hi-Fi DAC Left/Right channel Swap", WM8753_HIFI, 5, 1, 0), SOC_DOUBLE_R_TLV("PCM Volume", WM8753_LDAC, WM8753_RDAC, 0, 255, 0, dac_tlv), SOC_DOUBLE_R_TLV("ADC Capture Volume", WM8753_LADC, WM8753_RADC, 0, 255, 0, @@ -1087,7 +1088,7 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_codec *codec, { u16 ioctl, hifi; - hifi = snd_soc_read(codec, WM8753_HIFI) & 0x011f; + hifi = snd_soc_read(codec, WM8753_HIFI) & 0x013f; ioctl = snd_soc_read(codec, WM8753_IOCTL) & 0x00ae; /* set master/slave audio interface */