From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754086AbcFGLi5 (ORCPT ); Tue, 7 Jun 2016 07:38:57 -0400 Received: from regular1.263xmail.com ([211.150.99.139]:41625 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752023AbcFGLiz (ORCPT ); Tue, 7 Jun 2016 07:38:55 -0400 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:0;ATT:0;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-RL-SENDER: zhengxing@rock-chips.com X-FST-TO: broonie@kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: zhengxing@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <5756B22F.9000105@rock-chips.com> Date: Tue, 07 Jun 2016 19:38:23 +0800 From: Xing Zheng User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 To: Mark Brown CC: Rob Herring , linux-rockchip@lists.infradead.org, dianders@chromium.org, heiko@sntech.de, Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219 References: <1464267742-15312-1-git-send-email-zhengxing@rock-chips.com> <20160601144542.GA3835@rob-hp-laptop> <5751912C.6080904@rock-chips.com> <20160606235026.GP7510@sirena.org.uk> <5756363F.40208@rock-chips.com> <20160607104711.GR7510@sirena.org.uk> In-Reply-To: <20160607104711.GR7510@sirena.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On 2016年06月07日 18:47, Mark Brown wrote: > On Tue, Jun 07, 2016 at 10:49:35AM +0800, Xing Zheng wrote: >> On 2016年06月07日 07:50, Mark Brown wrote: >>> It should probably be three compatibles, one per CODEC, if the driver >>> needs to handle each separately. >> Do you mean like this: >> -------- >> sound { >> compatible = "rockchip,rk3399-max98357a-rt5514-da7219"; >> >> dailink-0 { >> compatible = "rockchip,rk3399-max98357a"; >> rockchip,cpu =<&i2s0>; >> rockchip,codec =<&max98357a>; >> }; >> >> dailink-1 { >> compatible = "rockchip,rk3399-rt5514"; >> rockchip,cpu =<&i2s0>; >> rockchip,codec =<&headsetcodec>; >> }; >> >> dailink-2 { >> compatible = "rockchip,rk3399-da7219"; >> rockchip,cpu =<&i2s0>; >> rockchip,codec =<&codec>; >> }; >> }; >> -------- >> Above, the machine drvier will handle them. Please correct me if I >> misunderstand. > No, that'd be one card with all three CODECs on the same board which I'm > guessing isn't the intention? Yes, because on our board, the audio connection by hardware really is such: |-- max98357a i2s0 <==> |-- rt5514 | -- da7219 We do need to support max98357a / rt5514 / da7219 via i2s0 on the same board for RK3399. I remember that it will be failed if we register card with i2s0 more times. Therefore, I chose this mothod that create 3 dai-links on one machine driver. Thanks. -- - Xing Zheng