From patchwork Mon Jul 22 17:57:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11053229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2EC913AC for ; Mon, 22 Jul 2019 17:58:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91C4B2821F for ; Mon, 22 Jul 2019 17:58:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 849D528433; Mon, 22 Jul 2019 17:58:23 +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=-2.1 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 173B02821F for ; Mon, 22 Jul 2019 17:58:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 715121814; Mon, 22 Jul 2019 19:57:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 715121814 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1563818299; bh=so9Ujy/1Tm8c+QxA5vfoKzcdCf0n2u9jpPsPJXj1USA=; h=Date:From:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=LZJz+0n46750Gq1ccI8ACzMKTUtEKyPfl5yQkJ/qv3gg02IWSxYp6GVwHswz3fK8G REtwCVgwofRQWDqEXiRuYYRhZj/0MD2v8dNYvUol4akgdRAd5YgpEG+3DGFznRKeVk Nbvgock2CWslksT20mdx5bOuhCSOoH8rtcfxldLY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 78F50F803D5; Mon, 22 Jul 2019 19:57:28 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 989AFF803D7; Mon, 22 Jul 2019 19:57:25 +0200 (CEST) Received: from rere.qmqm.pl (rere.qmqm.pl [91.227.64.183]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8C22EF8015B for ; Mon, 22 Jul 2019 19:57:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8C22EF8015B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="kYJhe9M0" Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 45sq691hxyzB2; Mon, 22 Jul 2019 19:56:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1563818162; bh=23nwcPg6LghmL+X6QZ2e5+/c+rY936MjVWfhrxkjVF0=; h=Date:From:Subject:To:Cc:From; b=kYJhe9M0Q8m6OxmSoewG3nvahj5usYnfFUHP5/0CxfzKXrxZ3pi0RO+sKb/piy6Oy JYp7KTisNJfDYecaPVJqjGzh6Yiydb++xqXylbtuGljjxuEmNompSTtCnb/QZT3Ujl WRn/KZnZbJJVMGWk0f9pQVXwi+CCDvQEk3w5D+y/jcd6BPt/CQI7fwncEfiOr205vl QfVO63ZxFBVCMdu12ItQaNLDJ4SDphI5kiKnAiuLYdr09TB8FL00z+GS9+jgrC7fLD N1sRSJ+tBF0ySMULFOw8YxpVc/NTFZ9P/eb+gOGbP3tt//fwPze8hjPBLW5oRqgq0D 8QFhMJeMTO0oA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.3 at mail Date: Mon, 22 Jul 2019 19:57:19 +0200 Message-Id: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= MIME-Version: 1.0 To: alsa-devel@alsa-project.org Cc: Alexandre Belloni , patches@opensource.cirrus.com, Nicolas Ferre , Liam Girdwood , Ludovic Desroches , Mark Brown , Takashi Iwai , Codrin Ciubotariu Subject: [alsa-devel] [PATCH 0/2] wm8904: adapt driver for use with audio-graph-card X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" X-Virus-Scanned: ClamAV using ClamSMTP This series allows to use WM8904 codec as audio-graph-card component. It is a rewrite of an earlier approach from https://patchwork.kernel.org/patch/10738097/ Series based on tiwai/sound/for-next tree. You can also pull from: https://rere.qmqm.pl/git/linux branch: wm8904 Example DTS: / { sound { compatible = "audio-graph-card"; widgets = "Speaker", "Loudspeaker", "Headphone", "Headphone Jack", "Microphone", "Internal Mic", routing = "Headphone Jack", "HPOUTL", "Headphone Jack", "HPOUTR", "Amplifier", "LINEOUTL", "Amplifier", "LINEOUTR", "Loudspeaker", "Amplifier", "IN1L", "MICBIAS", "IN1L", "Internal Mic"; dais = <&ssc0_port>; }; }; &i2c1 { status = "okay"; wm8904: acodec@1a { compatible = "wlf,wm8904"; reg = <0x1a>; clocks = <&rtc_32k>; clock-names = "mclk"; interrupts-extended = <&pioA PIN_PB3 IRQ_TYPE_LEVEL_HIGH>; #sound-dai-cells = <0>; codec_port: port { codec_ep: endpoint { remote-endpoint = <&ssc0_ep>; dai-format = "left_j"; bitclock-master; frame-master; mclk-fs = <256>; }; }; }; }; &ssc0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ssc0_default>; status = "okay"; atmel,shared-fs-pin; #sound-dai-cells = <0>; ssc0_port: port { ssc0_ep: endpoint { remote-endpoint = <&codec_ep>; }; }; }; Michał Mirosław (2): ASoC: wm8904: rework FLL handling ASoC: wm8904: automatically choose clock source .../devicetree/bindings/sound/wm8904.txt | 4 + sound/soc/atmel/atmel_wm8904.c | 11 +- sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wm8904.c | 494 ++++++------------ sound/soc/codecs/wm8904.h | 5 - sound/soc/codecs/wm_fll.c | 339 ++++++++++++ sound/soc/codecs/wm_fll.h | 26 + 8 files changed, 531 insertions(+), 354 deletions(-) create mode 100644 sound/soc/codecs/wm_fll.c create mode 100644 sound/soc/codecs/wm_fll.h