Received: by 10.213.65.68 with SMTP id h4csp2510926imn; Mon, 2 Apr 2018 08:52:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+y3xQ/iquvK3SvIFcJnADLo7WZxWURv+FyOTRbdDxRg32sStXjQlYQCCMLv0paoIEzkOXG X-Received: by 2002:a17:902:8b82:: with SMTP id ay2-v6mr10199369plb.12.1522684336601; Mon, 02 Apr 2018 08:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522684336; cv=none; d=google.com; s=arc-20160816; b=CVxbOePoDNt7zdvjkBfDfyNvr/enDo87ooo2hIIpZVz+FcA8RrA72m/utb1pCsiNV7 ITihCHZDO+3xBH9EyK8PFc+nLx8o0R67ElZ7wF5HT9aDN8JFeoGUlktNoFE+sTK5Cxk5 DAaHvFiO/ldNEWS6Nkzt4+491LdxX2Vv8kcUCFCH3/6GvdY+xw6i55b+Cu0+bosTJGDM C+jMk2CyZtd+Ped4Jb4tC4HkLQ3bE8XsKL3Apk0py8l3rv5cFqm5zAL3dO+l/8RkSG4S JVesouvAv600hYw0mGlUBPrSxqLqDQ9isBUdzt1ypn3tVc/C+8uBDyhcQ5mC0TxgPXCy qDTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=i6sBzldkb+gztsLlyMj9DuCogreIKC0+E99UjHDPQ0w=; b=u9QbcIAZSpWCuonh79BFqjgvHzN20+AIsiSAqV/gDXo6LV67c8ThfAa0t5Bsx9+v9d 58MagJ9nzPbToO32YClyT/QtMvy8o+648YxGD6lqSxw30puDTMzOttGDyD9xIBmOfB4H Pxw+1J5LoimAoD3Imjs0eCwDLFtZBwBilLq4MNgrgPG1ROlyOr/Oi9EkLSJxrB+YARqe XV4TgmnUf1d7S65hPgSzVFDFicbsxVBSJztcWOATNjembExmMbG+F7H1pHM6qqNDa8C4 mZYw+yihjqhd3j3Ptqvv4rWJ9Iw7v4XgyC2aPGugOdujOKwodQA0MCZQwmRCYPKO/A2M FL7w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si555808pla.34.2018.04.02.08.52.01; Mon, 02 Apr 2018 08:52:16 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752609AbeDBPuO (ORCPT + 99 others); Mon, 2 Apr 2018 11:50:14 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42808 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751913AbeDBPuN (ORCPT ); Mon, 2 Apr 2018 11:50:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 548FD4268A4E; Mon, 2 Apr 2018 15:50:12 +0000 (UTC) Received: from ovpn-112-56.rdu2.redhat.com (ovpn-112-56.rdu2.redhat.com [10.10.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67DF810EE960; Mon, 2 Apr 2018 15:50:09 +0000 (UTC) Message-ID: <67086fdd0cdd69142cb89cd00f90e5a580e6607a.camel@redhat.com> Subject: Re: call/normal switch was Re: omap4-droid4: voice call support was From: Dan Williams To: Tony Lindgren , Pavel Machek Cc: Sebastian Reichel , Mark Brown , Liam Girdwood , Rob Herring , 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 Date: Mon, 02 Apr 2018 10:50:08 -0500 In-Reply-To: <20180401173012.GB5700@atomide.com> References: <20180328140219.f6667up5evrrafkv@earth.universe> <20180329014507.GM5700@atomide.com> <20180331145531.GA10404@amd> <20180331181935.GX5700@atomide.com> <20180331191939.GA8999@amd> <20180331194616.GA19388@amd> <20180331195524.GB19388@amd> <20180331234314.GZ5700@atomide.com> <20180401131852.GA11086@amd> <20180401153631.GA5700@atomide.com> <20180401173012.GB5700@atomide.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 02 Apr 2018 15:50:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 02 Apr 2018 15:50:12 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dcbw@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-04-01 at 10:30 -0700, Tony Lindgren wrote: > * Tony Lindgren [180401 15:38]: > > * Pavel Machek [180401 13:20]: > > > On Sat 2018-03-31 16:43:14, Tony Lindgren wrote: > > > > * Pavel Machek [180331 19:56]: > > > > > On Sat 2018-03-31 21:46:16, Pavel Machek wrote: > > > > > > On Sat 2018-03-31 21:19:39, Pavel Machek wrote: > > > > > > > On Sat 2018-03-31 11:19:35, Tony Lindgren wrote: > > > > > > > > Cool :) Microphone still does not work for me.. I tried > > > > > > > > tweaking > > > > > > > > the alsamixer settings but no mic. This is with cold > > > > > > > > boot with > > > > > > > > droid4-kexecboot if that might make a difference, we > > > > > > > > may have > > > > > > > > some register uninitialized somewhere. Any ideas? > > > > > > > > > > > > > > Ok, I was focusing on the speaker side. > > > > > > > > > > > > > > alsamixer, tab to go to capture settings, set it to 37 37 > > > > > > > Mic2 Mic1 > > > > > > > should work, according to my notes, but not recently > > > > > > > tested and not > > > > > > > tested against real human. > > > > > > > > > > > > > > I'll attempt to test it, but something in my userland > > > > > > > shuts down > > > > > > > system just after boot 60% of time, which is rather > > > > > > > annoying. > > > > > > > > > > > > Hmm. So I tried again, and setting Mic1 and back in the > > > > > > capture > > > > > > settings crashed the modem. Bang, disconnected from the > > > > > > USB. > > > > > > > > > > Next try, and it worked this time. > > > > > > > > > > _Before the call_, set mode to Normal and then Call. Then go > > > > > to > > > > > capture, and set 100 100 Mic2 Mic1. Then place a call, > > > > > > > > > > AT+CFUN=1 > > > > > OK > > > > > ATD6; > > > > > > > > No luck with microphone here :( Using ttyUSB4, AT+CFUN=1 > > > > works, but ATD command on it just hangs the USB interface > > > > and I have to reload phy-mapphone-mdm6600 to reset the > > > > modem. > > > > > > Test call with real human worked (thanks to Rolf K.), I could > > > hear him > > > well but he reported call was very quiet. And that was with > > > capture > > > settings at 100%. > > > > Maybe the volume also needs to be controlled at mdm6600 end. > > I'm seeing some AT+CLVL=n with n being between [0-7] calls on > > DLCI2 in my Android logcat logs. > > > > > If you had a register dump from android with mics working, > > > preferably > > > not in speaker mode, perhaps I could try to figure it out? > > > > OK here are four diffs against starting the phone app for regular > > call, speaker call, and muted versions of them: > > > > http://muru.com/linux/d4/cpcap/ > > > > Also, I'm connected over cdma right now, not 3g, but I doubt > > that makes a difference for the microphone. > > Found it! Here's what I need to do over n_gsm: > > ngsm 1 "AT+CFUN=1" > ngsm 1 "AT+CFUN?" > ngsm 2 "AT+EACC=3,0" # enable mic > ngsm 2 "AT+CLVL=4" # set speaker volume > ngsm 2 "AT+CMUT=0" # unmute mic I tried to look through the QMI dumps we have in libqmi from 2013 (latest Qualcomm posted) and couldn't find anything to do with mic control, speaker volume, or anything like that. If the modem supports the AT service (which I think it does? Not looking at the libqmi dumps right now) then it could potentially tunnel these AT commands through QMI too. Perhaps Qualcomm added something to the Voice service after 2013, or perhaps there are other services that might control speaker/mic that we don't have public dumps for yet though. Dan > ngsm 1 "ATD${number}" > ngsm 1 "AT+CLCC" # list current calls > ngsm 2 "AT+NREC=1" # enable noise cancellation > ngsm 1 "AT+SCRN=0" # ??? not sure if this does anything > > while [ 1 ]; do > date > ngsm 1 "AT+CLCC" > sleep 10 > done > > So speaker phone call works just fine, I just tested with a > human at the other end :) > > Hmm let's hope all those also translate to some qmi calls. > > Regards, > > Tony