[alsa-devel] Application doing forward/rewind
Hi,
I am new to ALSA framework and currently working on an embedded platform. My ALSA driver works fine with APLAY and ARECORD utilities, which are coming along with the alsa-utils package. But they don't support forward and rewind. I wrote my own app for the same but the APIs are returning me 0, although some frames have been forwarded.
I searched a lot for some simple command line based audio player which can provide me this sort of functionality but I could not find one. Can someone help? If I have missed something, please let me know.
Thanks & Regards,
Anuj Aggarwal
Hi,
I am trying to use snd_pcm_forward and snd_pcm_rewind APIs in my application. Although they are doing something (I am able to 'hear' the jump), they return me 0, instead of returning me the number of frames.
What could be the problem with the application/driver?
Thanks & Regards, Anuj Aggarwal
On Mon, 12 May 2008, Aggarwal, Anuj wrote:
Hi,
I am trying to use snd_pcm_forward and snd_pcm_rewind APIs in my application. Although they are doing something (I am able to 'hear' the jump), they return me 0, instead of returning me the number of frames.
What could be the problem with the application/driver?
Show us output from snd_pcm_dump().
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
Please find the output from snd_pcm_dump() attached.
Is there any simple app to show the usage of forward/rewind APIs? I want to cross check my app against the same.
Thanks and Regards, Anuj Aggarwal
Platform Support Products Texas Instruments Inc Ph: +91-80-2509-9542 TI IP Ph: 509-9542 PSP Products RSS Feed PSP Product Announcements
-----Original Message----- From: Jaroslav Kysela [mailto:perex@perex.cz] Sent: Monday, May 12, 2008 1:47 PM To: Aggarwal, Anuj Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Forward/rewind APIs return 0
On Mon, 12 May 2008, Aggarwal, Anuj wrote:
Hi,
I am trying to use snd_pcm_forward and snd_pcm_rewind APIs in my application. Although they are doing something (I am able to 'hear' the jump), they return me 0, instead of returning me the number of frames.
What could be the problem with the application/driver?
Show us output from snd_pcm_dump().
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
On Thu, 15 May 2008, Aggarwal, Anuj wrote:
Please find the output from snd_pcm_dump() attached.
Ok, replace snd_pcm_dump() with snd_pcm_status_dump() and send output again, please. Also, if you can send me (privately) your test code, I'll try to check it and reproduce the problem.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
The output from snd_pcm_status_dump () is as below:
Playback Buffer number:2 STRecordAudio: Success for buffer 2, 1078935560 STPlaybackAudio: Success for buffer 2, 1078935560 Before: state : RUNNING trigger_time: 4621.974609375 tstamp : 4656.881958007 delay : 32739 avail : 29 avail_max : 2048 Playback : Forward No Action After: state : RUNNING trigger_time: 4621.974609375 tstamp : 4656.882232666 delay : 32726 avail : 42 avail_max : 42 Playback Buffer number:2 STRecordAudio: Success for buffer 3, 1079988232 STPlaybackAudio: Success for buffer 2, 1078935560 Before: state : RUNNING trigger_time: 4621.974609375 tstamp : 4668.769989013 delay : 32740 avail : 28 avail_max : 2048 Playback : Forward No Action After: state : RUNNING trigger_time: 4621.974609375 tstamp : 4668.770141601 delay : 32733 avail : 35 avail_max : 35 Playback Buffer number:2
I am able to jump but snd_pcm_forward() returns 0. Any sample showing the usage will really help.
Thanks and Regards, Anuj Aggarwal
-----Original Message----- From: Jaroslav Kysela [mailto:perex@perex.cz] Sent: Thursday, May 15, 2008 5:00 PM To: Aggarwal, Anuj Cc: alsa-devel@alsa-project.org Subject: RE: [alsa-devel] Forward/rewind APIs return 0
On Thu, 15 May 2008, Aggarwal, Anuj wrote:
Please find the output from snd_pcm_dump() attached.
Ok, replace snd_pcm_dump() with snd_pcm_status_dump() and send output again, please. Also, if you can send me (privately) your test code, I'll try to check it and reproduce the problem.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
Hi,
I am still waiting for any clues. Please help.
Thanks and Regards, Anuj Aggarwal
-----Original Message----- From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of Aggarwal, Anuj Sent: Friday, May 16, 2008 4:26 PM To: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Forward/rewind APIs return 0
The output from snd_pcm_status_dump () is as below:
Playback Buffer number:2 STRecordAudio: Success for buffer 2, 1078935560 STPlaybackAudio: Success for buffer 2, 1078935560 Before: state : RUNNING trigger_time: 4621.974609375 tstamp : 4656.881958007 delay : 32739 avail : 29 avail_max : 2048 Playback : Forward No Action After: state : RUNNING trigger_time: 4621.974609375 tstamp : 4656.882232666 delay : 32726 avail : 42 avail_max : 42 Playback Buffer number:2 STRecordAudio: Success for buffer 3, 1079988232 STPlaybackAudio: Success for buffer 2, 1078935560 Before: state : RUNNING trigger_time: 4621.974609375 tstamp : 4668.769989013 delay : 32740 avail : 28 avail_max : 2048 Playback : Forward No Action After: state : RUNNING trigger_time: 4621.974609375 tstamp : 4668.770141601 delay : 32733 avail : 35 avail_max : 35 Playback Buffer number:2
I am able to jump but snd_pcm_forward() returns 0. Any sample showing the usage will really help.
Thanks and Regards, Anuj Aggarwal
-----Original Message----- From: Jaroslav Kysela [mailto:perex@perex.cz] Sent: Thursday, May 15, 2008 5:00 PM To: Aggarwal, Anuj Cc: alsa-devel@alsa-project.org Subject: RE: [alsa-devel] Forward/rewind APIs return 0
On Thu, 15 May 2008, Aggarwal, Anuj wrote:
Please find the output from snd_pcm_dump() attached.
Ok, replace snd_pcm_dump() with snd_pcm_status_dump() and send output again, please. Also, if you can send me (privately) your test code, I'll try to check it and reproduce the problem.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
_______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
participants (2)
-
Aggarwal, Anuj
-
Jaroslav Kysela