Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3075315ybi; Mon, 10 Jun 2019 04:02:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJ9d5IJN/xC7E5Db6HGBu5kBsSdLHLuRS8ZXW3ehdQbFiHuem14JNgxwo09/7lK+1nMotb X-Received: by 2002:a17:902:9a49:: with SMTP id x9mr49625782plv.282.1560164541080; Mon, 10 Jun 2019 04:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560164541; cv=none; d=google.com; s=arc-20160816; b=pINRcezVTl5m0oungq7hxISsxLt/UQrobkwteRxfzVTFJ1EjjBq8wAxa3yzO/lXDNS THMc9Hx1AgXfdkBj/mTUBbWOuXKUyPYDeikhLvXY2CqXBsOJKzsSuyshLuoT5adTj6rP yWgVOcwScBc53WSlqbHDOAQUftvEPWeuxiUHFiw5D0G4ycvOXDbbfX4fPP3TFWYrsCQa OuJ5p+VCCu1ADfQryIo5LzCgYqpcKG/IYRsVaaZnchK4IAV4sKSzuc5uXGf+eqFfy/FW sDtvMCpGOs8LBAaXZ61XkNHIZ9/8APPvDXcQGvOuK6rDFjO31A1ebsoa70AIXHSKm9mN pyGg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1AprxLh5aOOnhZywN53A2N1mIL16pEeWCtpt7xVlSr8=; b=ghqpOAHL8aio9yeMrxn8FQCztSkXbzbSNQn7PiIMNtEJnntebNWuniOlzixr4dWAz/ v7U8yJ1OD1DUMVbwpyXgD13Z4VByifr3rTJ/6kh3Xlv+Gi+YuYleWLnIkyuC1iwny/uL x8edDhnKBT3M0uOASllEVRQaK7FKzwfkp+oh7TsRdj2qJtYu1zsNgtccag21MQGrhYgB bbsv68hVcp0jJO2xRcJjyUrLQ4rER79+5+B5D4Pxy1m3LV9uf+rVeDMMpbXPui+YTEVn Dqozd97h7Zn+M1K6RPxqNfj1STkJGtk5xgZaiCh/at316UyXtkSyVJs+t0PAn66sZBpo oVSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MClQ4N4O; 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 s1si9444247pgs.62.2019.06.10.04.01.50; Mon, 10 Jun 2019 04:02:21 -0700 (PDT) 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=MClQ4N4O; 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 S2389509AbfFJKve (ORCPT + 99 others); Mon, 10 Jun 2019 06:51:34 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:40578 "EHLO mail-wm1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389426AbfFJKve (ORCPT ); Mon, 10 Jun 2019 06:51:34 -0400 Received: by mail-wm1-f48.google.com with SMTP id v19so43943wmj.5 for ; Mon, 10 Jun 2019 03:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=1AprxLh5aOOnhZywN53A2N1mIL16pEeWCtpt7xVlSr8=; b=MClQ4N4O3u7TleNmr3+kf9KyEgDL6rPJXrdaT50lRkJpNI1feliLiLVruUFBRYy+y4 6gLcyXzP5rQEPWqz3jySykR+TU/xVffPTTz9wDA0JfQJTQ6qfP063Ckx7ZEvklIGhvL3 Rloj494ddqXuJedEDFgJz3GA/qQc5pn9xBHbVB5PDnCpeTcG/LYQOKdXqshXo+CbBg2g /TrgueDuP7ELXy+81uGqFVXG2YeoykR89E2gv9QXv7LqT/aYGFBFcVOjJidL6vGyxjUi AM+chloliR/fztzrJviZlhdv8iKyci5W770lBUCjLTl4v2ZqR8T/KNEYdGW7XJNEVunv jiXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1AprxLh5aOOnhZywN53A2N1mIL16pEeWCtpt7xVlSr8=; b=XLKUxjLO6WA9xZYj448v5ZjJVG3HWjKfAIG2kT4U6zo+B0MFLEAtntuP6dMw/0XxoY Tk43PXNrC/maOFmO49tHuWMTaD19sbTC7A+pf8VbrUkGb127rYGowQJvb4JUeSAV2opw RBQlXejDue/u8Gpb5l1rJJREXs4wkU2f6x4m81P+F2liqsPQv75WWqlCL/6VZeR2TAZj WsbeebFPaXn94h66A3rGM4ubGbYom7t8mMWjsTZ3gQ/4vDF8hUJMMpom+PvMs9YXrwWm drM4ZRDs7CZqLzBvmO+/OH+cLGjMS4sGmJk2NqGJsRRlU8QK+Uzmh0rm/lZKbQ+aaQ2p 4Ong== X-Gm-Message-State: APjAAAUx6QnbRRET7OFgwr3b3hJURDhILy4tYXfMxlWfKG64rDQ4huDS nt7LpS2NuftAnq50Dwonhm4pFhrRbxk= X-Received: by 2002:a1c:2e16:: with SMTP id u22mr12812178wmu.80.1560163891772; Mon, 10 Jun 2019 03:51:31 -0700 (PDT) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id b203sm10912029wmd.41.2019.06.10.03.51.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2019 03:51:30 -0700 (PDT) Date: Mon, 10 Jun 2019 12:51:30 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" Subject: Re: bluez A2DP socket reliability Message-ID: <20190610105130.un3muj4knwoua5cb@pali> References: <20190518190618.m7rdkthvpz4agxd2@pali> <20190519122223.gabew7qfftihlbic@pali> <20190607130021.ntd3dfd6nzmuy3m3@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Friday 07 June 2019 18:23:41 Luiz Augusto von Dentz wrote: > Hi Pali, > > On Fri, Jun 7, 2019 at 4:00 PM Pali Rohár wrote: > > > > On Sunday 19 May 2019 14:22:23 Pali Rohár wrote: > > > On Sunday 19 May 2019 11:13:09 Luiz Augusto von Dentz wrote: > > > > Hi Pali, > > > > > > > > On Sat, May 18, 2019 at 11:12 PM Pali Rohár wrote: > > > > > > > > > > Hello! How is L2CAP layer of bluetooth socket used for A2DP audio > > > > > transfer configured in bluez? It is reliable with big/infinite > > > > > retransmit count? Or in best-effort manner and some packets may be > > > > > dropped? And it is possible to change between these two modes for > > > > > application which uses bluez DBUS API? I'm asking because some A2DP > > > > > audio codecs are designed to deal with packet loss and for those codecs > > > > > it would be probably better to configure L2CAP socket to unreliable > > > > > mode. > > > > > > > > We don't use ERTM with AVDTP, both signaling and transport sockets are > > > > using basic mode which don't support retransmissions, there the > > > > concept of flush timeout which iirc we don't currently it. > > > > > > On bluez.org site there is no information how to use bluez sockets and > > > the only documentation/tutorial which I found on internet was this: > > > > > > https://people.csail.mit.edu/albert/bluez-intro/x559.html > > > > > > I do not know how up-to-date it is, but seems that by default bluez > > > L2CAP sockets are reliable and to change them to unreliable mode it is > > > needed to issue OGF_HOST_CTL / OCF_WRITE_AUTOMATIC_FLUSH_TIMEOUT (0x28) > > > request. As default is zero = infinity = reliable connection. > > > > > > I do not understand low level bluetooth details, but is ERTM related to > > > OCF_WRITE_AUTOMATIC_FLUSH_TIMEOUT? > > > > > > So what are default settings for L2CAP socket used by AVDTP/A2DP > > > profiles which are transferred to user application via DBUS? > > > > Hi! Do you have any idea about OCF_WRITE_AUTOMATIC_FLUSH_TIMEOUT? It is > > related to ERTM or not? > > The OCF usually describes an HCI command which may affect the entire > ACL connection, ERTM is a L2CAP channel mode that includes > retransmissions. The A2DP stream transport doesn't ERTM so no > retransmissions shall take place. Fine, no retransmission is good for A2DP. And how it is with delivering packets? It is possible that may be delivered to other side in wrong order? -- Pali Rohár pali.rohar@gmail.com