alsa의 latency.c를 실행하다 보니
깔끔하게 상태를 출력해주는 녀석이 있어서 찾아보게 됨.
[링크 : http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___dump.html#...1d8d]
----
[링크 : http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___dump.html#...a51]
[링크 : http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___dump.html]
            
                    
                    
깔끔하게 상태를 출력해주는 녀석이 있어서 찾아보게 됨.
| Hardware PCM card 0 'mxs-evk' device 0 subdevice 0 
Its setup is: 
  stream       : PLAYBACK 
  access       : RW_INTERLEAVED 
  format       : S16_LE 
  subformat    : STD 
  channels     : 2 
  rate         : 16000 
  exact rate   : 16000 (16000/1) 
  msbits       : 16 
  buffer_size  : 128 
  period_size  : 64 
  period_time  : 4000 
  tstamp_mode  : NONE 
  period_step  : 1 
  avail_min    : 64 
  period_event : 0 
  start_threshold  : 2147483647 
  stop_threshold   : 128 
  silence_threshold: 0 
  silence_size : 0 
  boundary     : 1073741824  | 
| snd_pcm_dump(phandle, output); 
snd_pcm_dump(chandle, output); 
fflush(stdout);  | 
[링크 : http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___dump.html#...1d8d]
----
|   state       : RUNNING 
  trigger_time: 2130.83093753 
  tstamp      : 2160.96375002 
  delay       : 48 
  avail       : 16 
  avail_max   : 44  | 
| snd_output_t *output = NULL; 
err = snd_output_stdio_attach(&output, stdout, 0); 
if (err < 0) { 
        printf("Output failed: %s\n", snd_strerror(err)); 
        return 0; 
} 
void showstat(snd_pcm_t *handle, size_t frames) 
{ 
        int err; 
        snd_pcm_status_t *status; 
        snd_pcm_status_alloca(&status); 
        if ((err = snd_pcm_status(handle, status)) < 0) { 
                printf("Stream status error: %s\n", snd_strerror(err)); 
                exit(0); 
        } 
        printf("*** frames = %li ***\n", (long)frames); 
        snd_pcm_status_dump(status, output); 
}[링크 : http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2latency_8c-example.html]  | 
[링크 : http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___dump.html#...a51]
[링크 : http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___dump.html]
'Linux API > alsa' 카테고리의 다른 글
| alsa timestamp (0) | 2014.11.26 | 
|---|---|
| alsa async (0) | 2014.11.26 | 
| ALSA 드라이버 관련 (0) | 2014.11.17 | 
| alsa 함수 - size / time (0) | 2014.11.17 | 
| alsa low latency (0) | 2014.11.03 | 
