From patchwork Wed Nov 6 15:49:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13865113 Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D13B205AC9 for ; Wed, 6 Nov 2024 15:49:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730908164; cv=none; b=TEwyB1WTqiOroxfAPeLuMWjzrwyrmUhq6WsidzNlb4gc+CcXsSOFMmwAP5Ti5jlMTB6M1B/vKhHQCMEnpNLc9Yam0ELBZaL1qduLBvryumq6W/GRU2Tg61Zp5JolDgUNjLYYBdV+0puoAWDP0sNcqhZdEVxuvAX+uyNGWj3e6k0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730908164; c=relaxed/simple; bh=Gc8A3j0lYztHN0hax0qTtiOOAnwfD1eV/15EE3N1fyU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=N2Xqm09eHgIgrHI7cpK4WZBvKqp8AVZ1phTOC9zcZvJ3knMr62etkZ2MJ+yTc1qVTDgwHszdnmReNs9xqca3rtz8jF27L+kw9cZSKxy8UE03Q0XWOqa3veX5QcrvFp4/og7txXb15n5u0pFAr6K12z5rGESxknAQIBu3mEqsqJE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nL4JNIjf; arc=none smtp.client-ip=209.85.221.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nL4JNIjf" Received: by mail-vk1-f170.google.com with SMTP id 71dfb90a1353d-50d58e5bfd2so2312957e0c.2 for ; Wed, 06 Nov 2024 07:49:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730908161; x=1731512961; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=bGv3cAhcgKfDkavlaMqAQk1K/NFlw5e846Fp0f+62sA=; b=nL4JNIjfLzwZEqS1c6zf7vKWZVSW9g7vbh9fisYjntUHVvmotftTtJm5qaoBv6qwgu XXAKX9o0j+h9ff2aiPzZzH/v2W61NnkWYiujBTawxSS00Yryv/pX9Ys3on8SUrvF2P+X MRx4bulJ2dtxBgDOFoh8/8SvJW9gTzKj2bvssWNQ90KqckM75wloGrOAdYLgR7GcsrCl 8wxm0ovGtEiLigdI0KgIsgyOM4GvNL2DAI0HT9fKu9J9T8KKszvRYSyEgr8AsGpqVNzb WZ8gSQVcGSLqa5aAZNIVz2cIqfuHJ+aMuAlkiuF1Evv6RLNZHA+XZRNtsCmq4Px1thCO EdYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730908161; x=1731512961; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bGv3cAhcgKfDkavlaMqAQk1K/NFlw5e846Fp0f+62sA=; b=q1htMEJcOv+qIVZ/eHX3b43x/AD0GXo66T6/to/4zFu4pUDg1Df9ntSd+JRV7oSPv9 quPyOj+ePUvmKvN6vIoq96e1TE10tb+uEGZFkZ71E1iF8fOhjgQphlhfwTSYkNsMNsuq ae8rU7PRuwnTCBHgzzR1H3lhq1mwOGZ1HGL2I1n96xhrXsJOfyb4TVvbZ07Gn9i9obSv J/Gv5Z34pbLev+KTHSuDX33ZA36H4yVfDTu22qTtcglLhoBh6mCKo5ZhEC4Luua+sXrG mL8g6d4SVN9t5Dfe7yYqLgn8w8ef1uQCV/VjHkeOw5WFWuhKZNajD9H0PdvQn05zFxm/ yxSw== X-Gm-Message-State: AOJu0YwgOi0PE8nE1Agvx3Vk4lEN1qukc8lXaQ4W+k+uFQ3XlJO/MWOd atbW/oYrXzlzIljk33aazyl2DtGdbj+GeSVKvoqqwuHFgsnkpkuBkoi/xw== X-Google-Smtp-Source: AGHT+IHU5z0khoAxH+AxxPm8SU/d5BBQmXYpI5OvoR9OWPm2Q3hqT1/mC7pKQAhBi/4zeWAaierP9A== X-Received: by 2002:a05:6122:65aa:b0:50d:85d7:d94b with SMTP id 71dfb90a1353d-51015116a1dmr36224216e0c.11.1730908160465; Wed, 06 Nov 2024 07:49:20 -0800 (PST) Received: from lvondent-mobl5.. (syn-107-146-107-067.res.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5106f2cb368sm2660558e0c.13.2024.11.06.07.49.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 07:49:19 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 1/3] sink: Fix transitioning to BTD_SERVICE_STATE_DISCONNECTED on idle Date: Wed, 6 Nov 2024 10:49:15 -0500 Message-ID: <20241106154917.64459-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz If the stream transition to AVDTP_STATE_IDLE it means the stream has been disconnected, not the session, therefore btd_service_disconnecting_complete shall not be called otherwise it may trigger the policy plugin to disconnect AVRCP in cases like codec reconfiguration. Fixes: https://github.com/bluez/bluez/issues/1003 --- profiles/audio/sink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c index 77f195436032..7e02bcca1a01 100644 --- a/profiles/audio/sink.c +++ b/profiles/audio/sink.c @@ -110,6 +110,7 @@ static void avdtp_state_callback(struct btd_device *dev, switch (new_state) { case AVDTP_SESSION_STATE_DISCONNECTED: sink_set_state(sink, SINK_STATE_DISCONNECTED); + btd_service_disconnecting_complete(sink->service, 0); break; case AVDTP_SESSION_STATE_CONNECTING: sink_set_state(sink, SINK_STATE_CONNECTING); @@ -135,8 +136,6 @@ static void stream_state_changed(struct avdtp_stream *stream, switch (new_state) { case AVDTP_STATE_IDLE: - btd_service_disconnecting_complete(sink->service, 0); - if (sink->connect_id > 0) { a2dp_cancel(sink->connect_id); sink->connect_id = 0; From patchwork Wed Nov 6 15:49:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13865114 Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A972920606F for ; Wed, 6 Nov 2024 15:49:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730908167; cv=none; b=LJeu24ltR5H6JLqzMiyikrSWtQ9MyTN1aTUPsA20S1lqC3m1duUX6jYR9RDwP3ID9JATq48TAbFsFsB5zXiRlK90YFKMTRZc54ZCJkFu/CWTMF8VwG+x9Vq+7FhAaPEtTc3WpW7Kmh2FvWkxD9eQ6bdxcmWXvh4yUtCWipH2NqY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730908167; c=relaxed/simple; bh=WtmajaAKL7SCAGCJgufgT8gVMzgIGpSZCIOK/C3+2jA=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VNCNgjUdrtyWUH8gHSUuVMWM02ZxxhFTMBwenf+5WXnFjJXtUCgGOkXjxA8FyvmMuEyHY9JOyst07xZk/Ceje5K5uj3ElQ4Uw1S2xOef9jgC3MUPBOYmcbpbv6ET0W7Vid//tcSLZr70OwrgVX9Fi9+v8DlmvxGar4KmimJTDYU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PFRjfFGW; arc=none smtp.client-ip=209.85.221.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PFRjfFGW" Received: by mail-vk1-f171.google.com with SMTP id 71dfb90a1353d-50d58e5bfd2so2312974e0c.2 for ; Wed, 06 Nov 2024 07:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730908164; x=1731512964; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/uznjUIjgVvz5jSsKwX54td7wRj73PP+f+7l3xr4trQ=; b=PFRjfFGWtOCg5hNQSrXQ8JBZ+sfnEn9+CWsMWdUi9ML9d60mRe3FWhRksNZy3XbGJ0 pgVcsV/5CpJIR0ZhuPRCxa2wbs6qDq7SVcWxiFoGAgOIBpBiMfhsnjO7QJ0empvnFg1M a0kl7+7EhBi8n1aUqJ1ln5bDeY7x0kSMrSG1hWbTDUiTwWobo4MSe7U/ZkYE0Tr2d0mP OWZgOBpy+75M6SjayIN0IdRDojodmSOdbBgFGraSoIr5V+qzcLb+pj49XxD4z2CLQPg0 jTnM8n/diz1EWiWaNvRLW7Wx9HVf8nbn/q0XJgad/7jgD7nBUwPuvogziR4xIzUsrDLU l56g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730908164; x=1731512964; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/uznjUIjgVvz5jSsKwX54td7wRj73PP+f+7l3xr4trQ=; b=Izh3RvUTk7XscJ5vJm11ijlTww4L7GwzvzjQ47+SJdfrlULcBYrOtGkiGXzUVMs7pN zqPGfiQ/dsbe4PY7XwjRlXRyrEGixA6xuo42fl8zWjwi8KRYywrReih3j51v6z1406Tw MzXJOl8MSx0sQ8hg8tdgZIJ/kJQT1t0vRgzTynfj+jP2IUWdjXriop2/4wdZeDqsdzbE nmj3N9zey3OIfvAoUBsiKOxCxMJ6SjtpFwdYO9Xuol8xxjT2MLdM+U3M5TcXan+OgZEj CuyKpjYbREryt8lc71430kao7vF+J8/ogvlaG0gCqHRi8FG5OyZ7vdjf/f/huFsC4alt nhMw== X-Gm-Message-State: AOJu0YyScUvu7nIgIPJJTvJ6BZvQlmnBidwck7SlyJDBHYxOTEv25KcA zIDeumEGJrC2frh2XCWXKfZV0iDTUFGPwETmetseLLczaEQXVFfvxlDCrg== X-Google-Smtp-Source: AGHT+IFMdk06aK14mTIpFfSmM6I2FmFfqeA6867PSne5f+QLQBQO5wbZ8njYn8SUFIKHQ2K2NnxzqQ== X-Received: by 2002:a05:6122:65aa:b0:50d:85d7:d94b with SMTP id 71dfb90a1353d-51015116a1dmr36224369e0c.11.1730908163812; Wed, 06 Nov 2024 07:49:23 -0800 (PST) Received: from lvondent-mobl5.. (syn-107-146-107-067.res.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5106f2cb368sm2660558e0c.13.2024.11.06.07.49.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 07:49:22 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 2/3] source: Fix transitioning to BTD_SERVICE_STATE_DISCONNECTED on idle Date: Wed, 6 Nov 2024 10:49:16 -0500 Message-ID: <20241106154917.64459-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106154917.64459-1-luiz.dentz@gmail.com> References: <20241106154917.64459-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz If the stream transition to AVDTP_STATE_IDLE it means the stream has been disconnected, not the session, therefore btd_service_disconnecting_complete shall not be called otherwise it may trigger the policy plugin to disconnect AVRCP in cases like codec reconfiguration. --- profiles/audio/source.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/profiles/audio/source.c b/profiles/audio/source.c index db777e86d542..885e218bfc7c 100644 --- a/profiles/audio/source.c +++ b/profiles/audio/source.c @@ -107,6 +107,7 @@ static void avdtp_state_callback(struct btd_device *dev, struct avdtp *session, switch (new_state) { case AVDTP_SESSION_STATE_DISCONNECTED: source_set_state(source, SOURCE_STATE_DISCONNECTED); + btd_service_disconnecting_complete(source->service, 0); break; case AVDTP_SESSION_STATE_CONNECTING: source_set_state(source, SOURCE_STATE_CONNECTING); @@ -132,8 +133,6 @@ static void stream_state_changed(struct avdtp_stream *stream, switch (new_state) { case AVDTP_STATE_IDLE: - btd_service_disconnecting_complete(source->service, 0); - if (source->connect_id > 0) { a2dp_cancel(source->connect_id); source->connect_id = 0; From patchwork Wed Nov 6 15:49:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Augusto von Dentz X-Patchwork-Id: 13865115 Received: from mail-vk1-f173.google.com (mail-vk1-f173.google.com [209.85.221.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BC462EAE0 for ; Wed, 6 Nov 2024 15:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730908169; cv=none; b=XY46W/8wDpmtKvHeDQvUybeEalMEIwMQPJxFi1C1I6S2qpuVvaE3VP5il51RWe8wbGEX8Dg/sbfjSQ3d+dpni5KocDpcfMH8Hu+JGpxgxlWS4+KdQT7a2DGXtp5romEg1oAozaEo7h9qa3R3ApOIqT03Awj+kZWbAE0PVbJtJwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730908169; c=relaxed/simple; bh=aydDjS2ytWEgxG5Sp+fDbG/iYHmlX2G+fXz1XgVsSNE=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rgIWDKJmZESGbbU0iv3jcm0eO4JpV4G/q4xNvLBXSakZDaAwFiGnRRmZApApPgK/9UfNph9yw8FEeJz2qihWRgnLYLLhmYzrNUpnZ6WjcMpw0M76v4sG3wzirskAXmMO/QSfUvd9n7g751q2x6m72JwOza4p/8HGqVVbTCSEAW4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=THn6S33Y; arc=none smtp.client-ip=209.85.221.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="THn6S33Y" Received: by mail-vk1-f173.google.com with SMTP id 71dfb90a1353d-50d4213c5f6so2672326e0c.3 for ; Wed, 06 Nov 2024 07:49:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730908166; x=1731512966; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XawhEC18HbAeFb7inIuwdGx5m71o26f+rYCxZL0nH1Q=; b=THn6S33Yzg1lYZfGaIY3fMmJC6GxLzaItRIn7a/dLar4fUqBh5LCuTDN6Ovrj9xBGV TWAbKI5/QFELT+YmacyhaqZDK/0miQLQU2Pg9Ba3Tm6nw0KVAA6bpGVbZ393zp1V2OWJ Ws4F8R8KszcuNpMssSnLsu2Buqir1QNP2oLM65v41xwbiSrbi9AcVoyaFFSzFckrbJoN RkkI6FPgEy7VeB3nqDEpuxNmgMjfl0uY2qF6AEz9t7rKDXCLZHqDLmuOHQLikYRjog4+ Wriu4Y1AVffbOWkMBKWwGlAEFQAMr3AobQDsnmFNr/qlWdp34a1p7Or98jnTWela4PzN yZiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730908166; x=1731512966; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XawhEC18HbAeFb7inIuwdGx5m71o26f+rYCxZL0nH1Q=; b=NDcZ3zD+nXmlmDEQJq3R4zSzJlpd1VvAEZdJaiTBvd9rrshcgEwSZQwixz9366oXQu VAjd094TO2LNhX+3Du1zuzDk+K8BuQ2p36KkPWwDH4vAUk83/zKRuKHW2Gz6FFxi/97g jzYp+8l+tW0UDH9B82GEWhEOki9ZOgxjaVXSZi3idtiDyicwUygKPN5kqAFJed+2iBzF fVFuPAzzHIsAlJkx1tg8MM7pZ4gGTGoIEozeXYumV96iXYU8h0tU1ofU6Rm09JrBb64M FmVSUH4QsK5JH2erS2TiUAkxVnO+2MGEFRe1L0x6LwTGjetfZmlgiR3SxIcElUAZCS88 nZEg== X-Gm-Message-State: AOJu0YyXvre8W1VXbPyM7r8Vl3BKC0DgcaN2ndSUgAALk+rqrTzX+8lC ly9dUmZSqYZqREN4Idp8HL77upwEw7vsDYeaWblcl5pDgIq7JURDEUoHcg== X-Google-Smtp-Source: AGHT+IGkHBwaVbMYL0UD5KTdm2lMe2gNS8rYSa8awJgmWvdeF/m8nS25XTEMmAdBNVgdgh4GgLxusw== X-Received: by 2002:a05:6122:31aa:b0:50d:5be4:c39d with SMTP id 71dfb90a1353d-5106ad573c6mr24030613e0c.0.1730908166302; Wed, 06 Nov 2024 07:49:26 -0800 (PST) Received: from lvondent-mobl5.. (syn-107-146-107-067.res.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5106f2cb368sm2660558e0c.13.2024.11.06.07.49.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 07:49:24 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 3/3] a2dp: Don't wait to reconfigure Date: Wed, 6 Nov 2024 10:49:17 -0500 Message-ID: <20241106154917.64459-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106154917.64459-1-luiz.dentz@gmail.com> References: <20241106154917.64459-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luiz Augusto von Dentz If the stream has been confirmed to be closed it should be safe to attempt to send SetConfiguration without having to wait for a period since the remote end can assume no new stream would be created it may end up disconnecting the session. --- profiles/audio/a2dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c index 37332abcad57..c97bd6e89deb 100644 --- a/profiles/audio/a2dp.c +++ b/profiles/audio/a2dp.c @@ -58,7 +58,6 @@ /* The duration that streams without users are allowed to stay in * STREAMING state. */ #define SUSPEND_TIMEOUT 5 -#define RECONFIGURE_TIMEOUT 500 #define AVDTP_PSM 25 @@ -1398,7 +1397,7 @@ static bool setup_reconfigure(struct a2dp_setup *setup) DBG("%p", setup); - setup->id = g_timeout_add(RECONFIGURE_TIMEOUT, a2dp_reconfigure, setup); + setup->id = g_idle_add(a2dp_reconfigure, setup); setup->reconfigure = FALSE;