public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] Possible insignificant bug in pcm_bluetooth.c (bluez-utils)
@ 2008-01-05 14:31 1
  2008-01-05 14:57 ` Brad Midgley
  0 siblings, 1 reply; 3+ messages in thread
From: 1 @ 2008-01-05 14:31 UTC (permalink / raw)
  To: bluez-users

Hello,
 here is question  raised while digging thru bluez-utils source.
Piece from /audio/pcm_bluetooth.c (function bluetooth_parse_config) :

if (strcmp(id, "mode") == 0) {
    if (snd_config_get_string(n, &mode) < 0) {
        SNDERR("Invalid type for %s", id);
        return -EINVAL;
    }

    if (strcmp(pref, "auto") == 0) {
        bt_config->channel_mode = BT_A2DP_CHANNEL_MODE_AUTO;
        bt_config->has_channel_mode = 1;
    } else if (strcmp(pref, "mono") == 0) {
        bt_config->channel_mode = BT_A2DP_CHANNEL_MODE_MONO;
        bt_config->has_channel_mode = 1;
    } else if (strcmp(pref, "dual") == 0) {
        bt_config->channel_mode = BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL;
        bt_config->has_channel_mode = 1;
    } else if (strcmp(pref, "stereo") == 0) {
        bt_config->channel_mode = BT_A2DP_CHANNEL_MODE_STEREO;
        bt_config->has_channel_mode = 1;
    } else if (strcmp(pref, "joint") == 0) {
        bt_config->channel_mode = BT_A2DP_CHANNEL_MODE_JOINT_STEREO;
        bt_config->has_channel_mode = 1;
    }
    continue;
}

if (strcmp(id, "allocation") == 0) {
    if (snd_config_get_string(n, &allocation) < 0) {
        SNDERR("Invalid type for %s", id);
        return -EINVAL;
    }

    if (strcmp(pref, "auto") == 0) {
        bt_config->allocation_method = BT_A2DP_ALLOCATION_AUTO;
        bt_config->has_allocation_method = 1;
    } else if (strcmp(pref, "loudness") == 0) {
        bt_config->allocation_method = BT_A2DP_ALLOCATION_LOUDNESS;
        bt_config->has_allocation_method = 1;
    } else if (strcmp(pref, "snr") == 0) {
        bt_config->allocation_method = BT_A2DP_ALLOCATION_SNR;
        bt_config->has_allocation_method = 1;
    }
    continue;
}

As I understood, bt_config->channel_mode and 
bt_config->allocation_method will never be set properly, because of
wrong variable in strcmp : strcmp(pref,"auto").
If I am right, there must be strcmp(mode,"auto") and 
strcmp(allocation,"auto") respectively.

Further, if it is bug, it is insignificant for now the configuration of 
A2DP (~/.asoundrc) is not fully implemented.
Found this in above file:
    /* FIXME: this needs to be really implemented (take into account 
real asoundrc settings + ALSA hw settings ) once server side sends us
    more than one possible configuration */

And something else: I got choppy sound (it chops every 2 sec) when 
listening my A2DP stereo headset Southwing SA505 (BT dongle ASUS WL-BTD-202,
Ubuntu Gutsy, bluez-3.24). Tried to:
- change configuration in ~/.asoundrc but unfortunately settings for 
A2DP unimplemented .
- changed hcid.conf -> lm accept,master and removed lp rswitch. with no use
Anybody knows what can it be?

Now waiting for new release in hope that A2DP settings will be 
implemented :)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez-users] Possible insignificant bug in pcm_bluetooth.c (bluez-utils)
  2008-01-05 14:31 [Bluez-users] Possible insignificant bug in " 1
@ 2008-01-05 14:57 ` Brad Midgley
  0 siblings, 0 replies; 3+ messages in thread
From: Brad Midgley @ 2008-01-05 14:57 UTC (permalink / raw)
  To: BlueZ users

Hi

> As I understood, bt_config->channel_mode and
> bt_config->allocation_method will never be set properly

I changed this in cvs. Send a unified diff next time... it's quicker
to figure out what you've found.

> Further, if it is bug, it is insignificant for now the configuration of
> A2DP (~/.asoundrc) is not fully implemented.
> Found this in above file:
>     /* FIXME: this needs to be really implemented (take into account
> real asoundrc settings + ALSA hw settings ) once server side sends us
>     more than one possible configuration */

yeah I'm not sure what the status is on this piece.

> And something else: I got choppy sound (it chops every 2 sec) when
> listening my A2DP stereo headset Southwing SA505 (BT dongle ASUS WL-BTD-202,
> Ubuntu Gutsy, bluez-3.24). Tried to:
> - change configuration in ~/.asoundrc but unfortunately settings for
> A2DP unimplemented .
> - changed hcid.conf -> lm accept,master and removed lp rswitch. with no use
> Anybody knows what can it be?

the other hcid.conf suggestion is to remove sniff from lp. Do you have
any other bt devices that you use? Is hcitool con only showing the
a2dp connection?

-- 
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bluez-users] Possible insignificant bug in, pcm_bluetooth.c (bluez-utils)
       [not found] <mailman.378267.1199593295.26582.bluez-users@lists.sourceforge.net>
@ 2008-01-08  1:52 ` Eugene
  0 siblings, 0 replies; 3+ messages in thread
From: Eugene @ 2008-01-08  1:52 UTC (permalink / raw)
  To: bluez-users

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

Hello, thanks for answer
> I changed this in cvs. Send a unified diff next time... it's quicker
> to figure out what you've found.
>
>   
yes, I should do it this way :)
> the other hcid.conf suggestion is to remove sniff from lp. Do you have
> any other bt devices that you use? Is hcitool con only showing the
> a2dp connection?
>
>   
It seems to be mystical, but when I reset all setting to their defaults, 
all chops were gone!
Don't know what to suggest now.
Mplayer was talking about broken pipe. May be it is an alsa issue?


[-- Attachment #2: it_had_even.vcf --]
[-- Type: text/x-vcard, Size: 55 bytes --]

begin:vcard
fn:Eugene
n:;Eugene
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 278 bytes --]

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-08  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.378267.1199593295.26582.bluez-users@lists.sourceforge.net>
2008-01-08  1:52 ` [Bluez-users] Possible insignificant bug in, pcm_bluetooth.c (bluez-utils) Eugene
2008-01-05 14:31 [Bluez-users] Possible insignificant bug in " 1
2008-01-05 14:57 ` Brad Midgley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox