Re: [Alsa-user] Bluetooth headset

2022-06-27 Thread Zala Pierre GOUPIL via Alsa-user
Thanks for all the info, guys! I have lots of things to try, now. I'll let you 
know how it goes.

For now, bluez-alsa works, I still have Pipewire to test.

Regards,

Zala



--- Original Message ---
Le dimanche 26 juin 2022 à 09:58, Stuart Longland  
a écrit :


> On Wed, 22 Jun 2022 11:45:22 +
> Zala Pierre GOUPIL via Alsa-user alsa-user@lists.sourceforge.net wrote:
>
> > I don't know which compilation option is missing this time but I have
> > a problem accessing a Bluetooth headset: I can pair and trust it but
> > the only connection to it that is proposed to me is through the
> > serial port of the headset. Needless to say that no sound is produced
> > here.
>
>
> You're not alone in compiling your own kernels… Bluetooth is a bit of a
> strange beast, the host controllers have kernel drivers, but for things
> like peripherals, there's a userspace driver stack called BlueZ that
> talks to the peripheral.
>
> There are three ways I know of to access audio devices in this manner:
>
> 1. PulseAudio BlueZ plug-in: this has been the "official" way for some
> time now. A2DP is pretty mature, but I find I only get low-quality
> audio when used full-duplex.
> 2. PipeWire BlueZ plug-in: Experimental, combines features of both
> PulseAudio and JACK (which is real nice), but there are some sharp
> edges. PipeWire is steadily improving however, and features CODECs
> that provide better quality audio CODECs on Bluetooth.
> 3. Bluez-ALSA: Skips the user-space media stack and links ALSA directly
> up to BlueZ. Haven't tried it in a looong time, the latest version
> is a re-write of the earlier attempt.
>
> I'm having reasonably good results with (2). With some coaxing, you
> can get headsets to operate in mSBC mode when being used full-duplex,
> which yields somewhat improved audio quality over the standard
> telephone-quality audio usually available.
>
> (3) is apparently landing in Debian 12 if that's the distribution you
> use. It is in the Gentoo portage tree. Not sure about Red Hat/Fedora
> derivatives.
>
> I note Ubuntu 22.04 seemed to ship PipeWire, so it may be starting to
> replace PulseAudio already.
> --
> Stuart Longland (aka Redhatter, VK4MSL)
>
> I haven't lost my mind...
> ...it's backed up on a tape somewhere.


___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth headset

2022-06-26 Thread Stuart Longland via Alsa-user
On Wed, 22 Jun 2022 11:45:22 +
Zala Pierre GOUPIL via Alsa-user  wrote:

> I don't know which compilation option is missing this time but I have
> a problem accessing a Bluetooth headset: I can pair and trust it but
> the only connection to it that is proposed to me is through the
> serial port of the headset. Needless to say that no sound is produced
> here.

You're not alone in compiling your own kernels… Bluetooth is a bit of a
strange beast, the host controllers have kernel drivers, but for things
like peripherals, there's a userspace driver stack called BlueZ that
talks to the peripheral.

There are three ways I know of to access audio devices in this manner:

1. PulseAudio BlueZ plug-in: this has been the "official" way for some
   time now.  A2DP is pretty mature, but I find I only get low-quality
   audio when used full-duplex.
2. PipeWire BlueZ plug-in: Experimental, combines features of both
   PulseAudio and JACK (which is real nice), but there are some sharp
   edges.  PipeWire is steadily improving however, and features CODECs
   that provide better quality audio CODECs on Bluetooth.
3. Bluez-ALSA: Skips the user-space media stack and links ALSA directly
   up to BlueZ.  Haven't tried it in a looong time, the latest version
   is a re-write of the earlier attempt.

I'm having reasonably good results with (2).  With some coaxing, you
can get headsets to operate in mSBC mode when being used full-duplex,
which yields somewhat improved audio quality over the standard
telephone-quality audio usually available.

(3) is apparently landing in Debian 12 if that's the distribution you
use.  It is in the Gentoo portage tree.  Not sure about Red Hat/Fedora
derivatives.

I note Ubuntu 22.04 seemed to ship PipeWire, so it may be starting to
replace PulseAudio already.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.


___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth headset

2022-06-22 Thread Peter P.
Bonjour,

I think I heard somewhere that you need pulseaudio to output audio via
bluetooth. A quick startpage.com search on "alsa bluetooth audio"
reveals this 
https://wiki.debian.org/Bluetooth/Alsa
as first result. Does the information there help perhaps?

cheers, P

* Zala Pierre GOUPIL via Alsa-user  
[2022-06-22 13:46]:
> Good afternoon,
> 
> Hello me, it's me again, with my custom compiled kernels :-)
> 
> I don't know which compilation option is missing this time but I have a 
> problem accessing a Bluetooth headset: I can pair and trust it but the only 
> connection to it that is proposed to me is through the serial port of the 
> headset. Needless to say that no sound is produced here.
> 
> Would you have any ideas about this subject guys, please?
> 
> Thanks a lot & Regards,
> 
> Zala
> 
> ---
> Je n'aime pas seulement ma vie, mais aussi celle des autres.
> (Blade Runner)


> ___
> Alsa-user mailing list
> Alsa-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-user



___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Bluetooth headset

2022-06-22 Thread Zala Pierre GOUPIL via Alsa-user
Good afternoon,

Hello me, it's me again, with my custom compiled kernels :-)

I don't know which compilation option is missing this time but I have a problem 
accessing a Bluetooth headset: I can pair and trust it but the only connection 
to it that is proposed to me is through the serial port of the headset. 
Needless to say that no sound is produced here.

Would you have any ideas about this subject guys, please?

Thanks a lot & Regards,

Zala

---
Je n'aime pas seulement ma vie, mais aussi celle des autres.
(Blade Runner)___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Bluetooth headset not available fopr playback

2012-02-11 Thread Fabrice DELENTE
Hello.

I have a bluetooth headset that I can connect to my computer:

# l2ping 00:18:91:*:*:*
Ping: 00:18:91:*:*:* from 00:1F:C6:DF:B0:FC (data size 44) ...
4 bytes from 00:18:91:*:*:* id 0 time 32.87ms

I have created a btheaset entry in my .asoundrc:

pcm.btheadset {
type bluetooth
device 00:18:91:*:*:*
profile auto
}
ctl.btheadset {
type bluetooth
}

However, I can't use the btheadset device in mplayer:

# mplayer -ao alsa:device=btheadset file.mp3
...snip...
bt_audio_service_open: connect() failed: Connection refused (111)
[AO_ALSA] Playback open error: Connection refused
Failed to initialize audio driver 'alsa:device=btheadset'
Could not open/initialize audio device - no sound.
Audio: no sound
Video: no video


Exiting... (End of file)

I can't see the device registered as a playback device in aplay -l
either.

This happens as a normal user as well as when I am root, so it musn't
be a permission issue?

Any hint?

Thanks!

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Bluetooth headset works, but ...

2010-11-20 Thread Ian Pilcher
I am trying to get my Bluetooth headset (Motorola HK201) working with
ALSA, so that I can use it with Twinkle.  My system is a ThinkPad T510
running Fedora 14, including PulseAudio.  The ThinkPad has two built-in
audio devices:

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset
High Definition Audio (rev 06)
01:00.1 Audio device: nVidia Corporation High Definition Audio
Controller (rev a1)

I have paired my headset with the laptop, and it shows up in the KDE
Multimedia control as both an output device and a capture device.  I
have set the headset as the preferred output and capture device, and I
am able to play audio through the headset with aplay (aplay foo.wav).

If I try to record from the headset (arecord foo.wav), however, it
still uses the microphone built in to the laptop.  (Verified by walking
away from the laptop while recording my voice and listening to the
resulting WAV.)

I have verified that the microphone does work by disabling the modules
for the built-in audio devices and rebooting.  When I do this, arecord
uses the microphone in the headset.

/etc/modprobe.d/disable-t510-sound.conf:

  install snd_hda_codec_nvhdmi /bin/true
  install snd_hda_codec_conexant /bin/true
  install snd_hda_codec /bin/true
  install snd_hda_intel /bin/true

I have tried creating a .asoundrc, based on the various examples that
Google has turned up:

  pcm.btraw {
  type bluetooth
  device 00:24:1C:36:A3:6B
  profile auto
  }

  ctl.btraw {
  type bluetooth
  }

  pcm.btheadset {
  type plug
  slave {
  pcm btraw
  }
  hint {
  show on
  description Motorola HK201
  }
  }

  ctl.btheadset {
  type bluetooth
  }

Unfortunately, neither of the virtual devices is able to do anything:

  [ipilc...@localhost temp]$ aplay -D btraw *.wav
  Playing WAVE 'foo.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
  aplay: set_params:1053: Sample format non available
  Available formats:
  - S16_LE

  [ipilc...@localhost temp]$ aplay -D btheadset *.wav
  Playing WAVE 'foo.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
  ALSA lib audio/pcm_bluetooth.c:1613:(audioservice_expect) BT_OPEN
  failed : Invalid argument(22)
  aplay: set_params:1116: Unable to install hw params:
  ACCESS:  RW_INTERLEAVED
  FORMAT:  U8
  SUBFORMAT:  STD
  SAMPLE_BITS: 8
  FRAME_BITS: 8
  CHANNELS: 1
  RATE: 8000
  PERIOD_TIME: 125000
  PERIOD_SIZE: 1000
  PERIOD_BYTES: 1000
  PERIODS: 4
  BUFFER_TIME: 50
  BUFFER_SIZE: 4000
  BUFFER_BYTES: 4000
  TICK_TIME: 0

I have searched in vain for any documentation that really explains how
ALSA and BlueZ (and PulseAudio) are supposed to work together.  I would
appreciate any suggestions about how I can make this work, or even how I
can debug the problem.

Thanks!

-- 

Ian Pilcher arequip...@gmail.com



--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth headset works, but ...

2010-11-20 Thread Ian Pilcher
An update.  Fedora sets the default ALSA device to PulseAudio, and
PulseAudio was not using the headset as its default source, even though
I used the KDE applet to prefer it.  After using padevchooser to set
the headset as the default audio source, arecord now records from the
headset, rather than the microphone built in to the laptop.

Even better, I have defined ALSA devices that specifically represent the
speaker and microphone in my headset, so I don't have to change the
PulseAudio default devices to make things work.  Here is my .asoundrc:

pcm.hk201_sink {
type pulse
device bluez_sink.00_24_1C_36_A3_6B
hint {
description Motorola HK201 - Speaker
}
}

pcm.hk201_source {
type pulse
device bluez_source.00_24_1C_36_A3_6B
hint {
description Motorola HK201 - Microphone
}
}

-- 

Ian Pilcher arequip...@gmail.com



--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Bluetooth headset : speaker works great, microphone no

2010-08-20 Thread Nsarko

Hi everyone,

I already posted a topic in archlinux forum on the subject, no one was 
able to solve my problem, so I'm taking my chance with the specialists 
:)

Here is the original topic : 
https://bbs.archlinux.org/viewtopic.php?id=103169

On my bluetooth headset, the speaker part is working correctly (I can 
hear sounds coming from mplayer or aplay on test files) but I can't 
record any sound ! The only thing I can get is a noisy, continuous 
scratch sound when I try very basic commands like :

arecord -D btheadset -f S16_BE blah.wav

My .asoundrc file :

pcm.btheadset {
type plug
slave {
pcm {
type bluetooth
device 00:1D:82:B4:59:19
profile auto
}
}

hint {
show on
description BT Headset
}
}

ctl.btheadset {
  type bluetooth
}

When trying with pulseaudio (erasing my .asoundrc), same result...

I'm using kernel 2.6.35 with alsa 1.23.

Am I doing something wrong ? Is there a way to do some debug with this 
type of device ? Someone on the arch forum talked about raw 
configuration (last post), how can I do that ? Did someone already 
manage to have a bluetooth headset fully functionnal ?

Thanks by advance for you help.


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth Headset

2009-06-12 Thread John R.
John R. wrote:
 Memo5 wrote:
 Thanks for your reply!

 -Dbtheadset produces a correct output when i play a wav-file with a 
 sampling rate of of the headset (8000). Otherwise I get a corrupt 
 sound output. Alsa does not resample my sound, but I don't know the 
 issue.
 
 Although I do not have this problem with A2DP I can reproduce it with 
 profile voice.  

For me, this is not a work around as I expect I will be using gstreamer 
as the glue for what I am trying to do:

gst-launch -v alsasrc ! audioconvert ! audioresample ! audio/x-raw-int, 
rate=8000, channel=1 ! alsasink device=bluetooth sync=false

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth Headset

2009-06-08 Thread Memo5
Thanks for your reply!

-Dbtheadset produces a correct output when i play a wav-file with a sampling 
rate of of the headset (8000). Otherwise I get a corrupt sound output. Alsa 
does not resample my sound, but I don't know the issue.

Do you use a bluetooth headset? If yes, can you please play a wav-file and 
send me the output of:
aplay -v -D btheadset /usr/share/sounds/alsa/Front_Right.wav

Steve


 I just joined list so can't directly reply to your email...

   2)
   Play a file with 48000 samples/s, sound output is NOT ok:
   aplay -v -B 10 -Dplug:btheadset Front_Righ.wav

 Try it with -Dbtheadset.  If I add plug it causes problems for me that
 sound similar to what you are reporting.

 John


 ---
--- OpenSolaris 2009.06 is a cutting edge operating system for enterprises
 looking to deploy the next generation of Solaris that includes the latest
 innovations from Sun and the OpenSource community. Download a copy and
 enjoy capabilities such as Networking, Storage and Virtualization. Go to:
 http://p.sf.net/sfu/opensolaris-get
 ___
 Alsa-user mailing list
 Alsa-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/alsa-user

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth Headset

2009-06-08 Thread John R.
Memo5 wrote:
 Thanks for your reply!
 
 -Dbtheadset produces a correct output when i play a wav-file with a sampling 
 rate of of the headset (8000). Otherwise I get a corrupt sound output. Alsa 
 does not resample my sound, but I don't know the issue.

Although I do not have this problem with A2DP I can reproduce it with 
profile voice.  For me ALSA does resample the sound but bluetoothd 
generates a constant stream of errors:


Jun  8 20:31:11 aqui bluetoothd[25704]: Audio API: BT_REQUEST - 
BT_START_STREAM
Jun  8 20:31:11 aqui bluetoothd[25704]: State changed 
/org/bluez/25704/hci0/dev_00_02_76_64_BB_C4: HEADSET_STATE_CONNECTED - 
HEADSET_STATE_PLAY_IN_PROGRESS
Jun  8 20:31:11 aqui bluetoothd[25704]: SCO socket opened for headset 
/org/bluez/25704/hci0/dev_00_02_76_64_BB_C4
Jun  8 20:31:11 aqui bluetoothd[25704]: SCO fd=20
Jun  8 20:31:11 aqui bluetoothd[25704]: Audio API: BT_RESPONSE - 
BT_START_STREAM
Jun  8 20:31:11 aqui bluetoothd[25704]: Audio API: BT_INDICATION - 
BT_NEW_STREAM
Jun  8 20:31:11 aqui bluetoothd[25704]: State changed 
/org/bluez/25704/hci0/dev_00_02_76_64_BB_C4: 
HEADSET_STATE_PLAY_IN_PROGRESS - HEADSET_STATE_PLAYING
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb d414b200 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb d22d7c00 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb d22d7e00 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb c7506600 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb c74cfc00 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb df07f600 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb df07f400 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb cfe71400 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb cfe71200 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb cfe71000 submission failed
Jun  8 20:31:11 aqui btusb_send_frame: hci0 urb c5d38000 submission failed


ALSA seems to do the right thing:

aplay  -v -D bluetooth audio_10.wav
Playing WAVE 'audio_10.wav' : Signed 16 bit Little Endian, Rate 44100 
Hz, Stereo
Plug PCM: Route conversion PCM (sformat=S16_LE)
   Transformation table:
 0 - 0*0.5 + 1*0.5
Its setup is:
   stream   : PLAYBACK
   access   : RW_INTERLEAVED
   format   : S16_LE
   subformat: STD
   channels : 2
   rate : 44100
   exact rate   : 44100 (44100/1)
   msbits   : 16
   buffer_size  : 22050
   period_size  : 5512
   period_time  : 125000
   tstamp_mode  : NONE
   period_step  : 1
   avail_min: 5512
   period_event : 0
   start_threshold  : 22050
   stop_threshold   : 22050
   silence_threshold: 0
   silence_size : 0
   boundary : 1445068800
Slave: Rate conversion PCM (8000, sformat=S16_LE)
Its setup is:
   stream   : PLAYBACK
   access   : MMAP_INTERLEAVED
   format   : S16_LE
   subformat: STD
   channels : 1
   rate : 44100
   exact rate   : 44100 (44100/1)
   msbits   : 16
   buffer_size  : 22050
   period_size  : 5512
   period_time  : 125000
   tstamp_mode  : NONE
   period_step  : 1
   avail_min: 5512
   period_event : 0
   start_threshold  : 22050
   stop_threshold   : 22050
   silence_threshold: 0
   silence_size : 0
   boundary : 1445068800
Slave: Bluetooth Audio Device
Its setup is:
   stream   : PLAYBACK
   access   : MMAP_INTERLEAVED
   format   : S16_LE
   subformat: STD
   channels : 1
   rate : 8000
   exact rate   : 8000 (8000/1)
   msbits   : 16
   buffer_size  : 4000
   period_size  : 1000
   period_time  : 125000
   tstamp_mode  : NONE
   period_step  : 1
   avail_min: 1000
   period_event : 0
   start_threshold  : 4000
   stop_threshold   : 4000
   silence_threshold: 0
   silence_size : 0
   boundary : 2097152000


The submission failed floods the logs with its volume.

I am running 4.41.  If I record the stream coming off the headset and 
play that back it works fine.

John

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth Headset

2009-06-07 Thread John R.
I just joined list so can't directly reply to your email...

  2)
  Play a file with 48000 samples/s, sound output is NOT ok:
  aplay -v -B 10 -Dplug:btheadset Front_Righ.wav

Try it with -Dbtheadset.  If I add plug it causes problems for me that 
sound similar to what you are reporting.

John


--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Bluetooth Headset

2009-06-05 Thread Memo5
Hi!

I did further testing, also with another headset (Nokia BH-208) where  I could 
get sound working with still some errors. 
It only possible to play correct sampled date with a rate of 8000, all other 
sample rates fail. If i test with another sampe-rate there is no correct 
output. I thought alsa does the correct resampling, but it does not

In my ~/.asoundrc I have included a plug device:
pcm.btheadset {
   type plug
   slave {
   pcm btheadsetraw
   }
}

pcm.btheadsetraw {
   type bluetooth
   device xx:xx:xx:xx:xx:xx
   profile auto
}


1)
Play a file with 8000 samples/s, sound output is fine:
aplay -v -B 10 -Dplug:btheadset Front_Right_resampled8000.wav

Playing WAVE 'Front_Right_resampled8000.wav' : Signed 16 bit Little Endian, 
Rate 8000 Hz, Mono
Plug PCM: Plug PCM: Bluetooth Audio Device
Its setup is:
  stream   : PLAYBACK
  access   : RW_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 1
  rate : 8000
  exact rate   : 8000 (8000/1)
  msbits   : 16
  buffer_size  : 800
  period_size  : 200
  period_time  : 25000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 200
  start_threshold  : 800
  stop_threshold   : 800
  silence_threshold: 0
  silence_size : 0
  boundary : 1677721600
-
2)
Play a file with 48000 samples/s, sound output is NOT ok:
aplay -v -B 10 -Dplug:btheadset Front_Righ.wav

Playing WAVE 'Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, 
Mono
Plug PCM: Plug PCM: Rate conversion PCM (8000, sformat=S16_LE)
Its setup is:
  stream   : PLAYBACK
  access   : RW_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 1
  rate : 48000
  exact rate   : 48000 (48000/1)
  msbits   : 16
  buffer_size  : 4800
  period_size  : 1200
  period_time  : 25000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 1200
  start_threshold  : 4800
  stop_threshold   : 4800
  silence_threshold: 0
  silence_size : 0
  boundary : 1258291200
Slave: Bluetooth Audio Device
Its setup is:
  stream   : PLAYBACK
  access   : MMAP_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 1
  rate : 8000
  exact rate   : 8000 (8000/1)
  msbits   : 16
  buffer_size  : 800
  period_size  : 200
  period_time  : 25000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 200
  start_threshold  : 800
  stop_threshold   : 800
  silence_threshold: 0
  silence_size : 0
  boundary : 1677721600
--


Why does alsa not sample correct? Do you need still more information to help 
me solve the Problem?

thanks,
Stefan


 Hi!

 I am configuring a Bluetooth Headset (Nokia BH-101) with alsa. Pairing with
 the device seems to be ok, but the sound-output and input is not.

 Playing a sound with
 aplay -D btheadset -B 10 /usr/share/sounds/alsa/Front_Right.wav
 produces a loud noise in the headset, only a recongnizeable distored sound
 is played in the background. It seems to me being a sampling-rate problem.

 A similar problem exists when i try to record a sound with arecord, a
 sample file is here: http://members.aon.at/astronom/files/test_bt_rec.wav
 It is an 16bit, mono PCM file with 8000Hz.
 Can anybody speziefie the problem when litening to this file. (it is a
 count-up until 10 - in german)

 My ~/.asoundrc:
 pcm.btheadset {
 type bluetooth
 device 00:xx:xx:xx:xx:xx
 profile voice
 }

 aplay --version
 aplay: version 1.0.16 by Jaroslav Kysela pe...@perex.cz
 (it is from Debian lenny)

 thanks,
 Steve

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Bluetooth Headset

2009-06-02 Thread Memo5
Hi!

I am configuring a Bluetooth Headset (Nokia BH-101) with alsa. Pairing with 
the device seems to be ok, but the sound-output and input is not.

Playing a sound with
aplay -D btheadset -B 10 /usr/share/sounds/alsa/Front_Right.wav
produces a loud noise in the headset, only a recongnizeable distored sound is 
played in the background. It seems to me being a sampling-rate problem.

A similar problem exists when i try to record a sound with arecord, a sample 
file is here: http://members.aon.at/astronom/files/test_bt_rec.wav
It is an 16bit, mono PCM file with 8000Hz.
Can anybody speziefie the problem when litening to this file. (it is a 
count-up until 10 - in german)

My ~/.asoundrc:
pcm.btheadset {
type bluetooth
device 00:xx:xx:xx:xx:xx
profile voice
}

aplay --version
aplay: version 1.0.16 by Jaroslav Kysela pe...@perex.cz
(it is from Debian lenny)

thanks,
Steve

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Bluetooth headset woes

2008-11-10 Thread James Dominy
Hi all,

I have successfully managed to output sound to my bluetooth headset using
mplayer and aplay, hooray! Two things elude me still though...

First, I cannot get audio capture to work via the headset, and second, I don't
know how to tell various applications like skype/exaile/audacious etc... to use
the headset. I can do it with mplayer, via the command line, but the device
doesn't show up as an option in the gui version.

So I suppose a directed set of questions is in order:

1) What do I have to do to get audio capture working. Is there something special
I need to add to my .asoundrc in addition to the following

pcm.bluetooth {
type bluetooth
device 00:18:E4:19:35:11
}


2) I'm guessing the way to go to get exaile, audacious etc... to 'detect' the
bluetooth headset as a device would be to create a virtual device in my
.asoundrc which wraps the bluetooth device, but I have no idea how to do that.
Any suggestions?

Thanks,
James

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] bluetooth headset doesn't work well(Motorola HS820)

2008-09-07 Thread Galaha Shine
Hi,

I have a blue-tooth headset connected to Ubuntu 8.04. I've created
~/.asoundrc as below:

pcm.bluetooth {
  type bluetooth
  device 20:04:07:80:BC:89
  profile voice
}

ctl.bluetooth {
type bluetooth
}

now I can use command `aplay -Dbluetooth -v 2.wav` to play sound to the
headset, but the sound is little bit wired. 

Playing WAVE '2.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
Warning: rate is not accurate (requested = 16000Hz, got = 8000Hz)
 please, try the plug plugin (-Dplug:bluetooth)
Bluetooth Audio Device
Its setup is:
  stream   : PLAYBACK
  access   : RW_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 1
  rate : 8000
  exact rate   : 8000 (8000/1)
  msbits   : 16
  buffer_size  : 4000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 1000
  period_event : 0
  start_threshold  : 4000
  stop_threshold   : 4000
  silence_threshold: 0
  silence_size : 0
  boundary : 2097152000

So I input command according to the aplay's recommendation `aplay
-Dplug:bluetooth -v 2.wav`. The problem comes out.

 aplay -Dplug:bluetooth -v 2.wav 
Playing WAVE '2.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
Plug PCM: Rate conversion PCM (8000, sformat=S16_LE)
Its setup is:
  stream   : PLAYBACK
  access   : RW_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 1
  rate : 16000
  exact rate   : 16000 (16000/1)
  msbits   : 16
  buffer_size  : 8000
  period_size  : 2000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 2000
  period_event : 0
  start_threshold  : 8000
  stop_threshold   : 8000
  silence_threshold: 0
  silence_size : 0
  boundary : 2097152000
Slave: Bluetooth Audio Device
Its setup is:
  stream   : PLAYBACK
  access   : MMAP_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 1
  rate : 8000
  exact rate   : 8000 (8000/1)
  msbits   : 16
  buffer_size  : 4000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min: 1000
  period_event : 0
  start_threshold  : 4000
  stop_threshold   : 4000
  silence_threshold: 0
  silence_size : 0
  boundary : 2097152000

It seems that ALSA plugs rate plugin. But I hear NOTHING from my headset
and aplay seems suspended. I turn on bluez debug flag and rebuild it. I
find the bluez suspending at 'bluetooth_playback_poll_descriptors'.


Sep  7 23:18:59 alex-laptop aplay: DEBUG: pcm_bluetooth.c 930
bluetooth_hsp_write: count=0 frames_to_read=24 
Sep  7 23:18:59 alex-laptop aplay: DEBUG: pcm_bluetooth.c 993
bluetooth_hsp_write: returning 24 
Sep  7 23:18:59 alex-laptop aplay: DEBUG: pcm_bluetooth.c 912
bluetooth_hsp_write: areas-step=16 areas-first=0 offset=0, size=1000
io-nonblock=0 io-hw_ptr=0 io-appl_ptr=0 stream.fd=8 link_mtu=48
data-count=0  
Sep  7 23:18:59 alex-laptop aplay: DEBUG: pcm_bluetooth.c 930
bluetooth_hsp_write: count=0 frames_to_read=24 
Sep  7 23:18:59 alex-laptop aplay: DEBUG: pcm_bluetooth.c 993
bluetooth_hsp_write: returning 24 
Sep  7 23:18:59 alex-laptop aplay: DEBUG: pcm_bluetooth.c 802
bluetooth_playback_poll_descriptors: Space =2 pfd[0].fd=5 pfd[1].fd=6 
Sep  7 23:19:01 alex-laptop audio[7979]: Received AT+VGS=11

Now I go deep into ALSA then I find ALSA suspending at:
int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
{
struct pollfd *pfd;
unsigned short *revents;
int i, npfds, pollio, err, err_poll;
npfds = snd_pcm_poll_descriptors_count(pcm);
if (npfds = 0 || npfds = 16) {
SNDERR(Invalid poll_fds %d\n, npfds);
return -EIO;
}
pfd = alloca(sizeof(*pfd) * npfds);
revents = alloca(sizeof(*revents) * npfds);
syslog( LOG_INFO, %s, __FUNCTION__ ); 
err = snd_pcm_poll_descriptors(pcm, pfd, npfds);
if (err  0)
return err;
if (err != npfds) {
SNDMSG(invalid poll descriptors %d\n, err);
return -EIO;
}
do {
pollio = 0;
err_poll = poll(pfd, npfds, timeout);-

It seems the bluez doesn't feed ALSA some signals. But why? I notice
'bluetooth_playback_start' haven't been invoked. Is it the point? Then I
keep tracing ALSA. I find in snd_pcm_rate_commit_area

result = snd_pcm_mmap_commit(rate-gen.slave, slave_offset,
slave_size);
if (result  (snd_pcm_sframes_t)slave_size) {
if (result  0)
return result;
result = snd_pcm_rewind(rate-gen.slave, result);   
---
if (result  0)
return result;
return 0;
} 


The snd_pcm_mmap_commit returns with 24 which indicates bluetooth SCO
link mtu(48bytes). And it causes