Thank you, Sylvain<br>If I put the DSP in play mode (B_PLAY_UL) I can send some garbage on dsp_api.ndb->a_du_1 and the peer will play it, but if I peek the data at dsp_api.ndb->a_du_0, it's null filled.  If I revert the play mode, I can see data on dsp_api.ndb->a_du_0.<br>
<br>I will keep trying to find out why DSP API works this way.  I just wanted to ask if some of you know why this happens.<br><br><br><br><div class="gmail_quote">On Sat, Dec 3, 2011 at 11:31 AM, Sylvain Munaut <span dir="ltr"><<a href="mailto:246tnt@gmail.com">246tnt@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> So, does the dsp_api.ndb->a_du_0 member hold the audio data to be send to<br>
> the other peer, or that's something else?  How can I capture the audio data<br>
> (after codec), make a slight modification to that data, and send it to the<br>
> other mobile?<br>
<br>
</div>Mmm, I'm not sure you can do that. You can 'peek' at the audio, but by<br>
the time you see the data there it may have been processed into TCH<br>
frames already.<br>
<br>
When in 'PLAY_MODE', it will take data to send from a_du_1  (in<br>
TCH/F). So it's possible that the data from the microphone would still<br>
be in a_du_0 and so you could put it in play mode, do your<br>
modification by copying data from a_du_0 to a_du_1 ...<br>
<br>
As I said : No documentation so it's all been done by error / trial,<br>
you'd have to try :)<br>
<div class="im"><br>
> I can see that AUDIO_TX_TRAFFIC_REQ/AUDIO_RX_TRAFFIC_IND<br>
> audio mode were created for that purpose, but I'm not sure how to use that.<br>
> Do I need to make the modifications I need on gsm_recv_voice and<br>
> gsm_send_voice (voice.c)?<br>
<br>
</div>Those are used to RX and TX frames from the host (rather than the<br>
phone directly). The only way to use them "as is" is to interface<br>
osmocom-bb with LCR (not sure if there is a howto ...).<br>
But as you saw in voice.c you could modify the code yourself to feed<br>
data if need be ...<br>
<br>
Cheers,<br>
<font color="#888888"><br>
    Sylvain<br>
</font></blockquote></div><br>