Received: by 10.213.65.68 with SMTP id h4csp1046344imn; Tue, 27 Mar 2018 13:42:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/MFU57rfg49sr20P2PfOv+HQoFPvTLN2caY8sDXE9UUh//CAvDFC9LfbgUuiHWqGKkgqP5 X-Received: by 10.101.88.76 with SMTP id s12mr521929pgr.423.1522183370118; Tue, 27 Mar 2018 13:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522183370; cv=none; d=google.com; s=arc-20160816; b=wYahko/bg7SvCv/kNiBtKZ640OMSv1cwwlsafHYvIf01LIV8MBa353nAn8ZsYpm5U1 Y5UkTWohuU/z75YnUHY64iZihpoIR2ad7WIGV/JQeylBHoOt48Pv+TAbpi+eTZ2cwgTa 1JBc3C86jFVsUzVmxnCX9TAfA/72e8F5Y6Ya2s3fmd310fYY/7ljch1hDOyjm5r+q60P h83yjBHWJlzHEM7pRmWYyF/yq0jtYtB/3S5Ai4sXGMX/W2f7Veg3hDoVAQaU1d4QJwsH 4jXyB7SoJzCHzW0OPAWHyUbItKwSuPVU6yoYDSyqQIFasKF0Bv81oi4yj14eDlOErI2X fm9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=nY9iKM5oA/T73mEM5ZxHY3g88OD+GXSnmolD3b+Y+t0=; b=XWERK7ZIGMuyp+RuXQsxSeKfsKhCHM0s8Loxd3yh33rz+tSRnMSFfvEyDUU8CsPw8P jqRbP1NlzIE9mq8eNsWFTgn7dk6Cpzhi+R9KGbx/DbnH2k08qVmykMhT7FfNUHNZaHag 7V4vBMtgTeL7tzQmC5iFP4gqTWU75LrR7juHTuCI5br+d+TQ3osfqYn7J9zr5h0uk7Dy 1ycvV4Iixn/VcTJAuUsW6nyq0CsldJ+P1ZeDr1zRpao3EUjMV29z6rPaVNrx5pfHTRnv e+54wKIBIDLz7/hdX8eGoGGmpHOt1Dlkevaz4yFYT2vRz/h6n8hCNOKd2IE9iUAuyl8u cplg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si1562664pfm.106.2018.03.27.13.42.35; Tue, 27 Mar 2018 13:42:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752131AbeC0UlR (ORCPT + 99 others); Tue, 27 Mar 2018 16:41:17 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:42884 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbeC0UlP (ORCPT ); Tue, 27 Mar 2018 16:41:15 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 4E6B38039B; Tue, 27 Mar 2018 22:41:12 +0200 (CEST) Date: Tue, 27 Mar 2018 22:41:12 +0200 From: Pavel Machek To: Sebastian Reichel Cc: Liam Girdwood , Mark Brown , Rob Herring , Tony Lindgren , Lee Jones , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: omap4-droid4: voice call support was Re: [PATCHv5,5/5] ARM: dts: omap4-droid4: add soundcard Message-ID: <20180327204111.GA2254@amd> References: <20180223200254.25685-6-sebastian.reichel@collabora.co.uk> <20180322204804.GA26871@amd> <20180322234832.o24ut5ahon46mdu4@earth.universe> <20180323100930.GA21644@amd> <20180323103006.alymgb3ywftb4gek@earth.universe> <20180326141638.GB1450@amd> <20180326155828.ttnduivadob4iqmd@earth.universe> <20180326203154.GA9334@amd> <20180326231022.vilvxwqkniffk775@earth.universe> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20180326231022.vilvxwqkniffk775@earth.universe> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > My understanding is, that we only need to replace the audio-graph-card > > > driver to something more complex. The VOICE DAI needs to be configured > > > differently based on the use case: > > >=20 > > > call: > > > * mode=3Di2s > > > * freq=3D26000000 > > > * samprate=3D16000 or samprate=3D8000 > >=20 > > Ok, lets ignore bluetooth for now. There is "normal" mode, and then > > there's "call" mode, right? Where's "normal" mode configured? >=20 > mcbsp3_port: port { > cpu_dai3: endpoint { > dai-format =3D "dsp_a"; > frame-master =3D <&cpcap_audio_codec1>; > bitclock-master =3D <&cpcap_audio_codec1>; > remote-endpoint =3D <&cpcap_audio_codec1>; > }; > }; Hmm. Can't tell mode and freq here easily. Does it default to i2s / 26000000? > > Could we simply always configure the VOICE DAI in the call mode? Yes, > > it would limit samplerates to 8 or 16k, but .. that's not too > > important limitation for voice codec...? >=20 > I think we could configure "normal" mode to use the same settings > as call mode. But ASoC will disable CPCAP, since there will be no > active user without ASoC knowing about the modem. Ok, but then we can just start playback/recording with the call, and everything should work, no? But Motorola code seems to do different magic according to modem type, so things may not be as easy. if (pdata->voice_type =3D=3D VOICE_TYPE_STE) { /* STE_M570 */ ret =3D cpcap_audio_reg_write(codec, 2, 0xAE06); if (rate =3D=3D 16000) ret |=3D cpcap_audio_reg_write(codec, 1, 0x8720); else ret |=3D cpcap_audio_reg_write(codec, 1, 0x= 8120); } else if (pdata->voice_type =3D=3D VOICE_TYPE_QC) { /* MDM6600 */ ret =3D cpcap_audio_reg_write(codec, 2, 0xAE02); if (rate =3D=3D 16000) { ret |=3D cpcap_audio_reg_write(codec, 1, 0x= 6720); } else { ret |=3D cpcap_audio_reg_write(codec, 1, 0x= 6120); } > > > "audio-graph-card" is not capable of doing this. I was planning to > > > try "audio-graph-scu-card" in combination with adding codecs for the > > > modem and BT to DT. If that does not work we need a Droid 4 specific > > > soundcard driver. > > >=20 > > > Either way "audio-graph-card" is not the correct driver for D4. I > > > added it nevertheless, since it gets audio working for now and there > > > is no risk of DT breakage. Old *.dtb will continue to work with the > > > "audio-graph-card" even after we switch to something else. > >=20 > > Well, you'll still cause regressions when you change the dts, as > > people will have wrong .config for new dts. >=20 > That's correct, the .config needs to change. I think that's > ok, because the only alternative is having no audio support > at all until the soundcard driver is ready. This means, that > you also need to change .config once its ready (in case you > want to use it). Ok, another problem seems to be that spaces in audio device name seem to confuse the userland. Aha, here: user@devuan:~$ cat /proc/asound/cards 0 [H58006000encode]: HDMI_58006000_e - HDMI 58006000.encoder HDMI 58006000.encoder 1 [Audio ]: Droid_4_Audio - Droid 4 Audio Droid 4 Audio =20 See how the card is refered simply as "Audio"? Same thing then happens in alsa "state" file: state.Audio { control.1 { =2E Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlq6rGcACgkQMOfwapXb+vIqOQCghGvv04YmFycuGlKWckl00eAD GtoAoINkt2oBkgwMbiOS8ATGe8+RmCjI =P5O7 -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--