public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] AVDTP socket?
Date: Wed, 17 Nov 2004 21:01:56 +0100	[thread overview]
Message-ID: <1100721716.7164.9.camel@pegasus> (raw)
In-Reply-To: <419BABF2.7080307@xmission.com>

Hi Brad,

> > struct sbc_frame_header {
> >         uint8_t syncword:8;             /* Sync word */
> >         uint8_t subbands:1;             /* Subbands */
> >         uint8_t allocation_method:1;    /* Allocation method */
> >         uint8_t channel_mode:2;         /* Channel mode */
> >         uint8_t blocks:2;               /* Blocks */
> >         uint8_t sampling_frequency:2;   /* Sampling frequency */
> >         uint8_t bitpool:8;              /* Bitpool */
> >         uint8_t crc_check:8;            /* CRC check */
> > } __attribute__ ((packed));
> 
> I tried reading this from the header but I get nonsensical results like 
> "3" for frequency. Only one bit is supposed to be specified in fields 
> like frequency, so the headset (rightly) rejects the set_config.

I think you have to convert it first. I don't know why the SBC example
files have this header. From my sniffs of the AVDTP media channel I
haven't seen this header data anywhere. So it is somekind of SBC file
format. Try this conversion:

static char *sf2str(uint8_t sf)
{
        switch (sf) {
        case 0:
                return "16 kHz";
        case 1:
                return "32 kHz";
        case 2:
                return "44.1 kHz";
        case 3:
                return "48 kHz";
        }
}

static char *cm2str(uint8_t cm)
{
        switch (cm) {
        case 0:
                return "Mono";
        case 1:
                return "Dual channel";
        case 2:
                return "Stereo";
        case 3:
                return "Joint stereo";
        }
}

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2004-11-17 20:01 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-07  5:36 [Bluez-devel] AVDTP socket? Brad Midgley
2004-11-07 12:27 ` Marcel Holtmann
2004-11-07 16:34   ` Brad Midgley
2004-11-07 16:54     ` Marcel Holtmann
2004-11-07 18:55       ` Brad Midgley
2004-11-07 21:33         ` Marcel Holtmann
2004-11-10  5:46           ` Brad Midgley
2004-11-10  8:47             ` Marcel Holtmann
2004-11-10 18:01               ` Brad Midgley
2004-11-10 18:57                 ` Marcel Holtmann
2004-11-12 23:13                   ` Brad Midgley
2004-11-13  0:38                     ` Marcel Holtmann
2004-11-13  3:13                       ` Brad Midgley
2004-11-13 13:06                         ` Marcel Holtmann
2004-11-14  7:54                           ` Brad Midgley
2004-11-14 15:29                             ` Marcel Holtmann
2004-11-17 15:47                               ` Brad Midgley
2004-11-17 15:52                                 ` Marcel Holtmann
2004-11-17 19:52                                   ` Brad Midgley
2004-11-17 20:01                                     ` Marcel Holtmann [this message]
2004-11-18 13:27                                 ` Henryk Plötz
2004-11-18 15:26                                   ` Brad Midgley
2004-11-18 19:11                                     ` Marcel Holtmann
2004-11-19 18:32                                     ` Henryk Plötz
2004-11-19 21:40                                       ` Brad Midgley
2004-11-18 23:59                                   ` Marcel Holtmann
2004-11-19  9:03                                     ` Brad Midgley
2004-11-19 11:41                                       ` Marcel Holtmann
2004-11-19 16:35                                         ` Brad Midgley
2004-11-19 16:53                                           ` Marcel Holtmann
2004-11-19 17:39                                             ` Marcel Holtmann
2004-11-19 20:45                                               ` Marcel Holtmann
2004-11-19 21:20                                                 ` Henryk Plötz
2004-11-19 21:33                                                   ` Marcel Holtmann
2004-11-19 23:58                                                     ` Henryk Plötz
2004-11-19 21:51                                                 ` Brad Midgley
2004-11-19 22:04                                                   ` Marcel Holtmann
2004-11-19 23:23                                                     ` Brad Midgley
2004-11-20  0:09                                                       ` Marcel Holtmann
2004-11-20  0:04                                                     ` Henryk Plötz
2004-11-20  0:43                                                       ` Marcel Holtmann
2004-11-20  0:50                                                         ` Henryk Plötz
2004-11-20  5:04                                                           ` Marcel Holtmann
2004-11-19 18:44                                       ` Henryk Plötz
2004-11-19 18:38                                     ` Henryk Plötz
2004-11-19 18:56                                       ` Marcel Holtmann
2004-11-19 21:06                                         ` Henryk Plötz
2004-11-19 21:23                                           ` Marcel Holtmann
2004-11-21  5:46                                   ` Henryk Plötz
2004-11-21 17:44                                     ` Marcel Holtmann
2004-11-22  3:18                                       ` Marcel Holtmann
2004-11-22  4:32                                         ` Henryk Plötz
2004-11-22 13:28                                           ` Marcel Holtmann
2004-11-23  0:53                                             ` Henryk Plötz
2004-11-23  6:22                                               ` Marcel Holtmann
2004-11-22  4:22                                     ` [Bluez-devel] sbc reindent Brad Midgley
2004-11-15  8:24                         ` [Bluez-devel] AVDTP socket? Sebastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1100721716.7164.9.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox