Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp88660ybg; Tue, 28 Jul 2020 00:17:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg4PV1gTnPg+iC1tzq8+O2udYIgIEkMm+TsrG1jaEFQmpooEhTNuyUEYisRTqDQDbH58IO X-Received: by 2002:a17:906:c56:: with SMTP id t22mr25686702ejf.50.1595920651367; Tue, 28 Jul 2020 00:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595920651; cv=none; d=google.com; s=arc-20160816; b=AFAf1N1xk8CX5duWxGP0EcTlzA47Awd7WlwMQLK8o8eVGfJeikKmlGBty4tPy4aw1m rk0tPodG//+guTj+4t5IaUqIFMPO8kURw9djSmIrHZAnL+AgVO2qSZRUarYphMringWX haLqYVArbXPbsfzJwJmrQmZcdzPQKl/uAd3fzWjP9FobtEYTuNzCJD8IDU7g9zW029Xy wFa2Xla9XTjhsG2x7wrYVOjmuD5usHWvV0XM3Y1XPiOZPhbAhyp8wrZeqKce0b4NxHqE PqbnidHsVBZ73cwzuwE2z4Zk6wnoAywKaH4yVrUteT52JMshKqYqmGPFK5sEinmBcuru D99g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=tiz6GsPnftNv9Jx+T7l8W/Wk8Ztwqow8CVWJoxdQCaQ=; b=fQLrL+PTLC/0etK7SG8yqqXualW8RGjBShGyKXCcpYxrXY3xmk8NMaVxmQ6foabZqi hRTf17iZxzn0Bs9L0uthXWYqZ8U2SRafNKEVJaeu+orBhcOcaYv1rt/gYTa8OXeXSL2s 2k+zE8h/o7CresS0REPH6b2o2l2VTlfSt3aLOSnJCvaOMhbyhFnhEz6OrJbS/wNSVLvA 45x4FQrS4QVlHBPKzaUpjdN3KBQPuXAANX9a10J07xYwOJQElRBaYpYV9NeoTJ6x34IM eb6tVMVvhASZHNu2aqrlSXUz4mQFPwGesSx3pLV2BICuM7yqoe/y+afUWboSlbeQ9MZl 5PDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss20si6772863ejb.700.2020.07.28.00.17.06; Tue, 28 Jul 2020 00:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726990AbgG1HRA convert rfc822-to-8bit (ORCPT + 99 others); Tue, 28 Jul 2020 03:17:00 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:41332 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726854AbgG1HRA (ORCPT ); Tue, 28 Jul 2020 03:17:00 -0400 Received: from marcel-macbook.fritz.box (p4ff9f430.dip0.t-ipconnect.de [79.249.244.48]) by mail.holtmann.org (Postfix) with ESMTPSA id B94B2CECCD; Tue, 28 Jul 2020 09:27:00 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH RFC] bluetooth: add support for some old headsets From: Marcel Holtmann In-Reply-To: <6f271bf7-04ee-c971-9c69-de3f696769ed@omprussia.ru> Date: Tue, 28 Jul 2020 09:16:59 +0200 Cc: Johan Hedberg , Bluetooth Kernel Mailing List , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Ildar Kamaletdinov Content-Transfer-Encoding: 8BIT Message-Id: <97E2381A-219D-46AF-962F-CBCD63B911AD@holtmann.org> References: <6f461412-a6c0-aa53-5e74-394e278ee9b1@omprussia.ru> <1834765D-52E6-45B8-9923-778C9182CFA9@holtmann.org> <848144D3-85F9-47F8-8CDA-02457FA7530F@holtmann.org> <0c2a8da1-6071-6597-d0d1-32ce1490aba7@omprussia.ru> <6f271bf7-04ee-c971-9c69-de3f696769ed@omprussia.ru> To: Sergey Shtylyov X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Sergey, >>>>>> The MediaTek Bluetooth platform (MT6630 etc.) has a peculiar implementation >>>>>> for the eSCO/SCO connection via BT/EDR: the host controller returns error >>>>>> code 0x20 (LMP feature not supported) for HCI_Setup_Synchronous_Connection >>>>>> (0x0028) command without actually trying to setup connection with a remote >>>>>> device in case such device (like Digma BT-14 headset) didn't advertise its >>>>>> supported features. Even though this doesn't break compatibility with the >>>>>> Bluetooth standard it breaks the compatibility with the Hands-Free Profile >>>>>> (HFP). >>>>>> >>>>>> This patch returns the compatibility with the HFP profile and actually >>>>>> tries to check all available connection parameters despite of the specific >>>>>> MediaTek implementation. Without it one was unable to establish eSCO/SCO >>>>>> connection with some headsets. > [...] >>>>>> Signed-off-by: Sergey Shtylyov >>>>>> >>>>>> --- >>>>>> This patch is against the 'bluetooth-next.git' repo. >>>>>> >>>>>> net/bluetooth/hci_event.c | 8 ++++++++ >>>>>> 1 file changed, 8 insertions(+) >>>>>> >>>>>> Index: bluetooth-next/net/bluetooth/hci_event.c >>>>>> =================================================================== >>>>>> --- bluetooth-next.orig/net/bluetooth/hci_event.c >>>>>> +++ bluetooth-next/net/bluetooth/hci_event.c >>>>>> @@ -2187,6 +2187,13 @@ static void hci_cs_setup_sync_conn(struc >>>>>> if (acl) { >>>>>> sco = acl->link; >>>>>> if (sco) { >>>>>> + if (status == 0x20 && /* Unsupported LMP Parameter value */ >>>>>> + sco->out) { >> >> Actually, I was expecting that you'd tell me to create a HCI quirk for this situation. >> I have a patch doing that but I haven't been able to locate the driver in which to set this >> quirk flag... > > And that's no wonder! The BT driver that needs this patch is out-of-tree (and not even open > source, it seems) as we have finally ascertained with Ildar... Is there any interest in the > "preparatory" patch that lowers the indentation levels in hci_cs_setup_sync_conn()? how is it possible that there is an out-of-tree Bluetooth driver. Seems odd. Maybe want to submit that upstream first. Regards Marcel