|
2008-11-29
, 23:56
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#42
|
The Following User Says Thank You to qole For This Useful Post: | ||
|
2008-11-30
, 00:09
|
Posts: 9 |
Thanked: 9 times |
Joined on Nov 2008
|
#43
|
Here's an interesting post about using Gnome Alsa Mixer to play mic input through BT headphones... for 5 seconds before something mysterious and internal kills the audio. Could this have anything to do with current difficulties?
The Following User Says Thank You to samr7 For This Useful Post: | ||
|
2008-11-30
, 07:28
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#44
|
|
2008-12-06
, 20:58
|
Posts: 961 |
Thanked: 565 times |
Joined on Jul 2007
@ Tyneside, North East England
|
#45
|
|
2008-12-14
, 09:25
|
Posts: 9 |
Thanked: 9 times |
Joined on Nov 2008
|
#46
|
access=thread
|
2008-12-14
, 09:53
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#47
|
I just committed a change to support multithreading in the ALSA backend for HFP for Linux. When the sound card is opened, and threaded access is configured, it will create a thread just for reading samples from the audio device, and another just for writing samples to the audio device. This should not require nonblocking mode to work and might be enough to get audio to work on Maemo with the alsa-dsp plugin.
Anybody up for trying this out?
To configure threaded access:
- Get the latest sources from SVN
- Open the preferences dialog, select the Audio Device tab
- In the device/options field, enter:
See the attachment.Code:access=thread
Then try the feedback test. If it still doesn't work on Maemo, gstreamer will have to be next.
Traceback (most recent call last):
File "./hfconsole", line 1089, in config_open
savecfg = self.config_get_vals()
File "./hfconsole", line 1185, in config_get_vals
vals['denoise'] = spr['Denoise']
KeyError: 'Denoise
HFPD: HCI Command status: 0x00 0x01 0x0405
HFPD: HCI Command status: 0x00 0x01 0x041b
HFPD: SDP: Supported features: 17
HFPD: HCI Command status: 0x00 0x01 0x0419
HFPD: HCI Name request complete (0): "<removed>" -> " P!MP"
HFPD: << AT+BRSF=15
HFPD: >> +BRSF:55
HFPD: >> OK
HFPD: << AT+CIND=?
HFPD: >> +CIND: ("battchg",(0-5)),("signal",(0-5)),("batterywarning",(0-1)),("chargerconnected",(0-1)),("service",(0-1)),("sounder",(0-1)),("message",(0-1)),("call",(0-1)),("roam",(0-1)),("callsetup",(0-3))
HFPD: >> OK
HFPD: << AT+CMER=3,0,0,1
HFPD: >> OK
HFPD: << AT+CLIP=1
HFPD: >> ERROR
HFPD: << AT+CCWA=1
HFPD: >> ERROR
HFPD: << AT+CHLD=?
HFPD: >> ERROR
HFPD: << AT+CIND?
HFPD: AG 00:19:63B:02:F4: Connected
HFPD: >> +CIND: 4,3,0,1,1,1,0,0,0,0
HFPD: >> OK
HFPD: HCI Command status: 0x00 0x01 0x0803
HFPD: << ATD150;
HFPD: HCI Command status: 0x00 0x01 0x0804
HFPD: >> OK
HFPD: >> +CIEV: 10,2
HFPD: HCI Command status: 0x00 0x01 0x0409
HFPD: HCI Command status: 0x00 0x01 0x040f
HFPD: AudioGatewayStart: /net/sf/nohands/hfpd/<removed>
HFPD: ** OpLatency: primary open took 118ms
HFPD: ALSA play state: 2
HFPD: ALSA play state: 2
HFPD: ALSA rec state: 2
HFPD: ALSA rec state: 2
HFPD: Pump: packet size = 24
HFPD: Pump: bot packet size = 160
HFPD: Pump: bot input max fill = 320
HFPD: Pump: bot min fill = 320
HFPD: Pump: bot max fill = 640
HFPD: Pump: top packet size = 24
HFPD: Pump: top input max fill = 320
HFPD: Pump: top min fill = 320
HFPD: Pump: top max fill = 640
HFPD: Pump: watchdog timeout = 500
HFPD: ALSA play state: 2
HFPD: ALSA rec state: 2
HFPD: ** OpLatency: bottom EP start took 29ms
HFPD: ** OpLatency: ALSA SndPushOutput took 773ms
HFPD: ** OpLatency: ALSA async overall took 775ms
HFPD: SoundIoPump: bottom input underprocessed (0 < 1000)
HFPD: SoundIoPump: bottom output underprocessed (0 < 1000)
HFPD: SoundIoPump: top input underprocessed (0 < 1000)
HFPD: SoundIoPump: top output underprocessed (0 < 1000)
HFPD: >> +CIEV: 10,3
HFPD: ** OpLatency: ALSA SndPushOutput took 15ms
HFPD: ** OpLatency: ALSA async overall took 25ms
HFPD: ** OpLatency: ALSA SndPushInput took 116ms
HFPD: ** OpLatency: ALSA async overall took 121ms
HFPD: >> +CIEV: 8,1
HFPD: >> +CIEV: 10,0
HFPD: ** OpLatency: ALSA SndPushInput took 298ms
HFPD: ** OpLatency: ALSA async overall took 303ms
HFPD: ** OpLatency: ALSA SndPushInput took 672ms
HFPD: ** OpLatency: ALSA async overall took 677ms
HFPD: SoundIoPump: bottom input overprocessed (9440 > 8000)
HFPD: SoundIoPump: top input underprocessed (0 < 1000)
HFPD: SoundIoPump: top output underprocessed (0 < 1000)
HFPD: ** OpLatency: ALSA SndPushInput took 1386ms
HFPD: ** OpLatency: ALSA async overall took 1394ms
HFPD: SoundIoPump: bottom input overprocessed (11200 > 8000)
HFPD: SoundIoPump: bottom output underprocessed (320 < 1000)
HFPD: SoundIoPump: Top endpoint timeout
HFPD: SoundIoPump Stopped
HFPD: ** OpLatency: primary close took 24ms
HFPD: Sound card failed: SoundIoPump: Top endpoint timeout
HFPD: HCI Command status: 0x00 0x01 0x0406
HFPD: HCI Command status: 0x00 0x01 0x0803
HFPD: >> +CIEV: 8,0
|
2008-12-14
, 11:34
|
Posts: 76 |
Thanked: 41 times |
Joined on Nov 2008
@ Germany
|
#48
|
|
2008-12-14
, 21:52
|
Posts: 9 |
Thanked: 9 times |
Joined on Nov 2008
|
#49
|
The preferences window fails to work for me now:
'
So I edited ~/.hfconsole and put access=thread under [options] manually. When I dial, I get audio open for a few seconds (no sound) but then the phone reports "transferred to phone (as opposed to a headset)" and it says "primary sound card failure".
Okay, great news everybody!
I tried the latest version with access=thread and the feedback test is working now !!
I had to tune the Packet Interval a little to get it non-lagging (has to be >25ms), but after that it just works fine (and produces a nice echoing by the way (Don't hit me, I know that's not what we are after at the moment))
Strangely even the preferences window still works for me just fine.
Sadly, when I try to make a call in most cases the phone still gets disconnected (log attaced, seems similar to qwerty's).
Once it didn't and said it would transfer the audio but I wasn't able to hear audio from the tablet nor to hear myself in the phone I called. Also everything seemed to have crashed after the call had been initiated and hfp blocked the audio device (had to issue a "dsp_dld --enable-restart" to get it working again)
I tried but failed to reproduce that behavior...
I remember something like "3 times, you're out" from the output, but missed to capture it.
|
2008-12-14
, 22:09
|
Posts: 76 |
Thanked: 41 times |
Joined on Nov 2008
@ Germany
|
#50
|
1. Local audio gets into a bad state. Does simply killing hfpd fix this, or did you run that dsp_dld command after killing hfpd, in order to fix the state?
2. It looks like you got a spontaneous RFCOMM disconnection. So, now that the local audio at least pretends to work, let's focus on the apparent Bluetooth problems. Would you be willing to update your sources, rebuild and restart hfpd, run 'hcidump -t hci0' and post the output?
Thanks again for trying that out. It looks like the latency instrumentation was added to just the right place.
So, unless somebody knows how to add nonblocking support to alsa-dsp, it looks like the next direction to take this project is to create a gstreamer backend module. That's going to be messy.