Re: Forward/rewind APIs return 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx]
Sent: Monday, May 12, 2008 1:47 PM
To: Aggarwal, Anuj
Cc: alsa-devel@xxxxxxxxxxxxxxxx
Subject: Re:  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@xxxxxxxx>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

[root@OMAP3EVM bin]# ./forward_pcm_new
Playback : Open Success
Capture : Open Success
Hardware Configuration : Memory Allocation, Success
Hardware Configuration :Initialization, Success
Hardware Configuration : Set Access Success
Hardware Configuration : Set Format Success
Hardware Configuration : Set Rate Success
Hardware Configuration : Set Channel Success
PCM is in OPEN State before snd_pcm_hw_params
PCM access type is RW_INTERLEAVED
Hardware Configuration : Set Parameters Success
PCM is in PREPARED State
Capture : Hardware Configuration : Success
Hardware Configuration : Memory Allocation, Success
Hardware Configuration :Initialization, Success
Hardware Configuration : Set Access Success
Hardware Configuration : Set Format Success
Hardware Configuration : Set Rate Success
Hardware Configuration : Set Channel Success
PCM is in OPEN State before snd_pcm_hw_params
PCM access type is RW_INTERLEAVED
Hardware Configuration : Set Parameters Success
PCM is in PREPARED State
Capture : Hardware Configuration : Success
STFullDuplexAudio:: STRecordAudio thread: Pass: Status = 0
STFullDuplexAudio:: STPlaybackAudio thread: Pass: Status = 0
Playback Buffer number:0
STRecordAudio: Success for buffer 0, 1076830216
STPlaybackAudio: Success for buffer 0, 1076830216
Playback Buffer number:1
STRecordAudio: Success for buffer 1, 1077882888
STPlaybackAudio: Success for buffer 1, 1077882888
Playback Buffer number:2
STRecordAudio: Success for buffer 2, 1078935560
STPlaybackAudio: Success for buffer 2, 1078935560
Before:
Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0
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  : 32768
  period_size  : 1024
  period_time  : 23219
  tick_time    : 7812
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 1
  stop_threshold   : 32768
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Playback : Forward No Action
After:
Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0
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  : 32768
  period_size  : 1024
  period_time  : 23219
  tick_time    : 7812
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 1
  stop_threshold   : 32768
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Playback Buffer number:2
STRecordAudio: Success for buffer 3, 1079988232
STPlaybackAudio: Success for buffer 2, 1078935560
Before:
Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0
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  : 32768
  period_size  : 1024
  period_time  : 23219
  tick_time    : 7812
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 1
  stop_threshold   : 32768
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Playback : Forward No Action
After:
Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0
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  : 32768
  period_size  : 1024
  period_time  : 23219
  tick_time    : 7812
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 1024
  xfer_align   : 1024
  start_threshold  : 1
  stop_threshold   : 32768
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Playback Buffer number:2

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux