2009-09-01 18:27:42     BFLT audio app using ALSA

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-09-01 18:27:42     BFLT audio app using ALSA

GNU Citizen (UNITED KINGDOM)

Message: 79452   

 

Hi

 

Has anybody managed to make BFLT(not shared FLAT) audio application. I am trying to customize an application received from 3rd party; the cut down portion of the code looks like below:-

 

int main() {

    printf("ALSA Audio test\n");

 

    snd_pcm_t *pstPcmOut;

    int iRet = snd_pcm_open(&pstPcmOut, "default", SND_PCM_STREAM_PLAYBACK, 0);

    if (iRet < 0) {

        printf("Error opening the device\n");

        return -1;

    }

 

    printf("ALSA Audio success\n");

 

    snd_pcm_drain(pstPcmOut);

    snd_pcm_close(pstPcmOut);

 

    return 0;

 

}

 

I am building the above code as:-

 

bfin-uclinux-gcc -IHEADER_LOCATIONS  -LLIBS_LOCATION -mcpu=bf531-any -elf2flt -lasound -lpthread -lrt -ldl test.c

 

When i run the binary on the target device i get this error:-

 

ALSA lib pcm.c:2109:(snd_pcm_open_conf) symbol _snd_pcm_plug_open is not defined inside (null)

 

 

 

My wild guess is that _snd_pcm_plug_open defined in libasound.a:pcm_plug.o is not getting included into the application binary(a.out) because of the way ALSA emulates dynamic loading. May be i am missing some defines or compiler flags to get this working.

 

I have attached the asound library that i link against. Any clues appreciated.

 

 

 

reached from:   blackfin.uclinux.org/gf/project/uclinux-dist/forum/?_forum_action=ForumMessageBrowse&thread_id=8310&action=ForumBrowse&forum_id=39

 

libasound.a

QuoteReplyEditDelete

 

 

2009-09-01 18:29:41     Re: BFLT audio app using ALSA

Mike Frysinger (UNITED STATES)

Message: 79453   

 

ALSA is built around loading plugins dynamically.  we've never tested FLAT (i.e. hacked it up) nor do we plan on doing so.

QuoteReplyEditDelete

Attachments

Outcomes