Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7997280ybc; Fri, 29 Nov 2019 04:15:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxKi07t3KJM6bttfBmVDMT9Vd8YVkuopVfnHj0otDPHKCITv7E5rRFB9A+Bu5xYsq5AS/lx X-Received: by 2002:a50:fc96:: with SMTP id f22mr45259792edq.119.1575029708992; Fri, 29 Nov 2019 04:15:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575029708; cv=none; d=google.com; s=arc-20160816; b=HnE5jGEkgb8pyKkLz3vuPWbyAq/RfW+w+xrYHeJq2U4gRxZLXwNPrzECiZxw9c34uP QkNHHfdCP6AVIVzOrcuT4MpkhF+O2KSgmr0vRqH8nTu642CG0rzJ/by6kGoJKGzTgyWz Hd6AtV6eJGJcx4QbolgDcGVb3YrVHT0jq9oaJhvBnNkyRFdf328+mHh2aUvtFR/MW58R od2ycRGC6Rb4UhJCC864kf/HIIT9LyLtB+e84KfBV37epbTCn0lhKaosci3qA8NdyzaR vmLPT0v0W34jsYvk6Honx1EG77cSn/wXbfFeOaGyYtY8iQznKYzIHBJj6cZKJZK7vE51 XJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WQklKgnIoawUmpuv74Epiptl8hhkOUY+M61a7MLzVow=; b=bmoKstSlqvx4jmwotf4kaWr+NVscP4sg5mUK0G1MSwhXFgyLsj6E8oaoiMrzSNnkJ7 pZqVk9EyELX4+pLPYhyY4Bedh6CMiWtQcqD0IppeFInFH58BW7QowEvLL2DcmWAFoDRb +ql/PNHOpjuWB9fI6oEaouZdqU94SgYbcY2klOrF4KHJXzpUyjNDlaO9ge15psG90c7R Zyjp/gUe9jnc5D5iWmz5l4RtB8GtDHd39VQYAy/X83qvXBMjk+bLUmsHrydezmg0i1w7 KEp+mLB05rHXLbsclmQl1eXLsAbicVcVrm6SFQPy5CWDbfCutaADyjaKzWIC7emOUOcm OyZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gwSOMjwW; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si2657081edq.276.2019.11.29.04.14.43; Fri, 29 Nov 2019 04:15:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gwSOMjwW; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbfK2MOm (ORCPT + 99 others); Fri, 29 Nov 2019 07:14:42 -0500 Received: from mail-il1-f196.google.com ([209.85.166.196]:43622 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbfK2MOm (ORCPT ); Fri, 29 Nov 2019 07:14:42 -0500 Received: by mail-il1-f196.google.com with SMTP id u16so782419ilg.10 for ; Fri, 29 Nov 2019 04:14:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WQklKgnIoawUmpuv74Epiptl8hhkOUY+M61a7MLzVow=; b=gwSOMjwWDYbtBHqTKqgQO4q+obwiwC9o6/hFamS0T9S6UknJbpLUaX/mkBTJgXH7G5 v0kPhPK3FdgOz604GndP0wUoEvZdVW+5qwUacBdzQMn5d0qhqAJbaHg6u29vSbXRjEnM 3AExbbyy3mNZWJ/MqaKHetD5X2tQ1Yctj1ynEqur0v1aAn0aAFRPkA8mUcg/GxeFcuAz ZH+hDlUZVabqf2b5W/29pvyvMaNs9+F5YapH5tM5qKGC1aurzlQHTFgKoU+Bwdc4XK4C Dma2hI1Fc5BLzWTJ8lLmy13d1uCitTPCLhKZ739w4ukebzBiokvEPT2GkLLGjkHg2Qhh bngQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WQklKgnIoawUmpuv74Epiptl8hhkOUY+M61a7MLzVow=; b=uiPojcBJfitxQ9SLjkBlaMTQtTkBvJqu398wPxR3i9w1/+2+NTqVZKikcETb4Km+vv +nSatmyJU5yIOfef4NP1jKT6tBYIY1X+bHTzpwVVYrGORMANvoHpdaDOvLDJZGN6xG4B 2MTpfeFKwpUyhrKfxWW2T1w6xwd/06cuGB5dF3WU8/ISTs0P8V86u9WfuCTBlv7YxQSD JRKwmT6ZiXOqmbaUAVJpBCtKBohfFWRS4iribxSO0L8XYGyp6Lj16M8wFbmuZRtPSpnd WIoCol52DRuvsRi9TktuBWeFXxEfl9abRZ2qZIORGqn4B31mrZ8T0RVeMM4t6q1/98qX W4Jg== X-Gm-Message-State: APjAAAVx0Qmhxs2+pcYuQw/mEg5xEFjkByQhU25O0/SaRTl2EuEDo5h+ kX6UUZCENqbjjjWS8DHtnEU2WZFVpLxbxSh0bJcrAhCMmj8= X-Received: by 2002:a92:884e:: with SMTP id h75mr1332532ild.199.1575029679785; Fri, 29 Nov 2019 04:14:39 -0800 (PST) MIME-Version: 1.0 References: <20191128091748.24531-1-sathish.narasimman@intel.com> In-Reply-To: <20191128091748.24531-1-sathish.narasimman@intel.com> From: Sathish Narasimman Date: Fri, 29 Nov 2019 17:44:28 +0530 Message-ID: Subject: Re: [PATCH v4 1/2] bluetooth: add support to notify SCO air mode To: Bluez mailing list Cc: Sathish Narsimman Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi, On Thu, Nov 28, 2019 at 2:47 PM Sathish Narsimman wrote: > > notifying HCI_NOTIFY_CONN_ADD for SCO connection is generic in > case of msbc audio. To differnetiate SCO air mode audio introducing > HCI_NOTIFY_SCO_CVSD and HCI_NOTIFY_SCO_TRASP. > > Signed-off-by: Sathish Narsimman > --- > include/net/bluetooth/hci.h | 2 ++ > include/net/bluetooth/hci_core.h | 3 +++ > net/bluetooth/hci_event.c | 9 +++++++++ > 3 files changed, 14 insertions(+) > > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h > index 5bc1e30dedde..26af112b1f2c 100644 > --- a/include/net/bluetooth/hci.h > +++ b/include/net/bluetooth/hci.h > @@ -52,6 +52,8 @@ > #define HCI_NOTIFY_CONN_ADD 1 > #define HCI_NOTIFY_CONN_DEL 2 > #define HCI_NOTIFY_VOICE_SETTING 3 > +#define HCI_NOTIFY_ENABLE_SCO_CVSD 4 > +#define HCI_NOTIFY_ENABLE_SCO_TRANSP 5 > > /* HCI bus types */ > #define HCI_VIRTUAL 0 > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h > index b689aceb636b..9258e19f8cc5 100644 > --- a/include/net/bluetooth/hci_core.h > +++ b/include/net/bluetooth/hci_core.h > @@ -1604,4 +1604,7 @@ void hci_copy_identity_address(struct hci_dev *hdev, bdaddr_t *bdaddr, > #define SCO_AIRMODE_CVSD 0x0000 > #define SCO_AIRMODE_TRANSP 0x0003 > > +#define SCO_CODED_CVSD 0x02 > +#define SCO_CODED_TRANSP 0x03 > + > #endif /* __HCI_CORE_H */ > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c > index c1d3a303d97f..ecad696db139 100644 > --- a/net/bluetooth/hci_event.c > +++ b/net/bluetooth/hci_event.c > @@ -4231,6 +4231,15 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev, > break; > } > > + BT_DBG("sco connected with air mode: %02x", ev->air_mode); > + if (ev->air_mode == SCO_CODED_CVSD) { > + if (hdev->notify) > + hdev->notify(hdev, HCI_NOTIFY_ENABLE_SCO_CVSD); > + } else if (ev->air_mode == SCO_CODED_TRANSP) { > + if (hdev->notify) > + hdev->notify(hdev, HCI_NOTIFY_ENABLE_SCO_TRANSP); > + } > + > hci_connect_cfm(conn, ev->status); > if (ev->status) > hci_conn_del(conn); > -- > 2.17.1 > Please ignore this as Patch V5 is updated. Regards Sathish N