From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752135AbdIRBqO (ORCPT ); Sun, 17 Sep 2017 21:46:14 -0400 Received: from regular1.263xmail.com ([211.150.99.133]:51532 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbdIRBqN (ORCPT ); Sun, 17 Sep 2017 21:46:13 -0400 X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: mka@chromium.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <59BF255B.2040203@rock-chips.com> Date: Mon, 18 Sep 2017 09:46:03 +0800 From: jeffy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130126 Thunderbird/19.0 MIME-Version: 1.0 To: Matthias Kaehlcke CC: linux-kernel@vger.kernel.org, briannorris@chromium.org, dianders@chromium.org, Jaroslav Kysela , alsa-devel@alsa-project.org, Heiko Stuebner , linux-rockchip@lists.infradead.org, Mark Brown , Takashi Iwai , Liam Girdwood , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] Asoc: rockchip: Init dapm routes dynamically References: <20170905041401.23866-1-jeffy.chen@rock-chips.com> <20170916005407.GH173745@google.com> In-Reply-To: <20170916005407.GH173745@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, Thanks for your test and review. On 09/16/2017 08:54 AM, Matthias Kaehlcke wrote: >> -static const struct snd_soc_dapm_route rockchip_dapm_routes[] = { >> >- /* Input Lines */ >> >- {"MIC", NULL, "Headset Mic"}, >> >- {"DMIC1L", NULL, "Int Mic"}, >> >- {"DMIC1R", NULL, "Int Mic"}, >> >- >> >- /* Output Lines */ >> >- {"Headphones", NULL, "HPL"}, >> >- {"Headphones", NULL, "HPR"}, >> >- {"Speakers", NULL, "Speaker"}, >> >+ SND_SOC_DAPM_LINE("HDMI", NULL), > The HDMI items are newly added, I think a separate patch would be > preferable. ok, will do > >> > }; >> > >> > static const struct snd_kcontrol_new rockchip_controls[] = { >> >@@ -66,6 +55,7 @@ static const struct snd_kcontrol_new rockchip_controls[] = { >> > SOC_DAPM_PIN_SWITCH("Speakers"), >> > SOC_DAPM_PIN_SWITCH("Headset Mic"), >> > SOC_DAPM_PIN_SWITCH("Int Mic"), >> >+ SOC_DAPM_PIN_SWITCH("HDMI"), >> > }; >> > >> > static int rockchip_sound_max98357a_hw_params(struct snd_pcm_substream *substream, >> >@@ -314,8 +304,6 @@ static struct snd_soc_card rockchip_sound_card = { >> > .owner = THIS_MODULE, >> > .dapm_widgets = rockchip_dapm_widgets, >> > .num_dapm_widgets = ARRAY_SIZE(rockchip_dapm_widgets), >> >- .dapm_routes = rockchip_dapm_routes, >> >- .num_dapm_routes = ARRAY_SIZE(rockchip_dapm_routes), >> > .controls = rockchip_controls, >> > .num_controls = ARRAY_SIZE(rockchip_controls), >> > }; >> >@@ -391,6 +379,65 @@ static const struct snd_soc_dai_link rockchip_dais[] = { >> > }, >> > }; >> > >> >+static const struct snd_soc_dapm_route rockchip_sound_cdndp_routes[] = { >> >+ /* Output */ >> >+ {"HDMI", NULL, "TX"}, >> >+}; >> >+ >> >+static const struct snd_soc_dapm_route rockchip_sound_da7219_routes[] = { >> >+ /* Output */ >> >+ {"Headphones", NULL, "HPL"}, >> >+ {"Headphones", NULL, "HPR"}, >> >+ >> >+ /* Input */ >> >+ {"MIC", NULL, "Headset Mic"}, >> >+}; >> >+ >> >+static const struct snd_soc_dapm_route rockchip_sound_dmic_routes[] = { >> >+ /* Input */ >> >+ {"Dmic", NULL, "Int Mic"}, > Should be "DMic" as in dmic_dapm_widgets of the dmic codec driver. > > This route is also new and would probably be better added in a > separate patch. ok, will do >