Re: [PATCH BlueZ] audio: Add support for specific error codes for A2DP configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Per,

On Thu, Sep 11, 2025 at 3:56 PM Per Waago (pwaago) <pwaago@xxxxxxxxx> wrote:
>
>
>
>
> > ________________________________________
> > From: Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx>
> > Sent: Thursday, September 11, 2025 17:52
> > To: Per Waago (pwaago)
> > Cc: Pauli Virtanen; linux-bluetooth@xxxxxxxxxxxxxxx
> > Subject: Re: [PATCH BlueZ] audio: Add support for specific error codes for A2DP configuration
> >
> > Hi Per,
> >
> > On Thu, Sep 11, 2025 at 11:12 AM Per Waago (pwaago) <pwaago@xxxxxxxxx> wrote:
> > >
> > > Hi Luiz, thanks for reviewing.
> > >
> > > > From: Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx>
> > > > Sent: Thursday, September 11, 2025 16:43
> > > > To: Per Waago (pwaago); Pauli Virtanen
> > > > Cc: linux-bluetooth@xxxxxxxxxxxxxxx
> > > > Subject: Re: [PATCH BlueZ] audio: Add support for specific error codes for A2DP > configuration
> > > >
> > > > Hi Per,
> > > >
> > > > On Thu, Sep 11, 2025 at 9:56 AM Per Waagø <pwaago@xxxxxxxxx> wrote:
> > > > >
> > > > > The A2DP specification defines error codes that shall be used if
> > > > > the codec capabilities contain improper settings. This change allows
> > > > > clients to trigger the sending of these specific error codes by
> > > > > returning the corresponding error messages from
> > > > > MediaEndpoint1.SetConfiguration.
> > > > >
> > > > > This update is fully backwards compatible: clients passing other error
> > > > > messages will continue to receive the default error code as before. On
> > > > > older BlueZ versions, these new errors will also result in the default
> > > > > error code, enabling clients to implement support for the new errors
> > > > > without breaking compatibility.
> > > >
> > > > While I can see the value for debugging I doubt we could do any
> > > > handling of these errors, so the result would be the same regardless
> > > > of what error is sent back it is not recoverable.
> > > >
> > >
> > > The main motivation for adding them is to be able to pass the
> > > mandatory qualification tests, which now checks the errors codes
> > > returned from SetConfiguration in detail. I don't think they are very
> > > useful otherwise.
> > >
> > > The errors are specified in table 5.5 in the A2DP spec:
> > > > https://www.bluetooth.com/specifications/specs/html/?src=a2dp_v1-4-1_1752513648/A2DP_v1.4.1/o> ut/en/index-en.html#UUID-0ba19ee9-7277-1068-d2dc-b9e638cca568_Table_5.5
> > >
> > > I included all of them for completeness. In that table, it is also stated
> > > which codecs they apply to. Some are SBC-specific, some apply to all codecs or
> > > other codecs.
> >
> > Ok this is very annoying if PTS suddenly adds a new test case that
> > checks error codes that otherwise are only useful for debugging. I'd
> > say that it probably needs a configuration entry to skip these tests,
> > btw this seems to be introduced in 1.4.1:
> >
> > https://www.bluetooth.com/specifications/specs/html/?src=a2dp_v1-4-1_1752513648/A2DP_v1.4.1/o> ut/en/index-en.html#UUID-05a1c924-2070-eb38-c2cc-a9ffa178bdb9
> >
> > BlueZ SDP record is still 1.4 (a2dp_ver = 0x0104), it seems 1.4.1 is
> > an errata only change but that introduces new error codes which is
> > really intrusive to say the least.really intrusive to say the least.
>
> I have tried to read the specs in some more detail now. It seems the error
> codes themselves have been there all the time. The errata that was incorporated
> in 1.4.1 actually eases the requirements a bit, so the spec now says
> that these error codes shall be returned if error codes from GAVDP or AVDTP
> aren't used. So the way I interpret it, returning AVDTP_UNSUPPORTED_CONFIGURAION
> could be ok according to 1.4.1.

Indeed it says 'are not rejected with error codes specified by GAVDTP or AVDTP:

'If the Codec Specific Information Elements include improper settings
and are not rejected with the error codes specified by GAVDP [3] or
AVDTP [4], then an applicable error code from the list in Table 5.5
shall be returned.'

So why it was failing if we returned AVDTP_UNSUPPORTED_CONFIGURATION,
that should still be valid according to the above AVDTP error codes
are still valid.

-- 
Luiz Augusto von Dentz





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux