Lines Matching refs:afd
48 int afd; in pcm_play() local
50 afd = open("/dev/msm_pcm_out", O_RDWR); in pcm_play()
51 if (afd < 0) { in pcm_play()
56 if(ioctl(afd, AUDIO_GET_CONFIG, &config)) { in pcm_play()
63 if (ioctl(afd, AUDIO_SET_CONFIG, &config)) { in pcm_play()
77 if (write(afd, buf, sz) != (ssize_t) sz) in pcm_play()
82 ioctl(afd, AUDIO_START, 0); in pcm_play()
86 if (ioctl(afd, AUDIO_GET_STATS, &stats) == 0) in pcm_play()
91 if (write(afd, buf, sz) != (ssize_t) sz) in pcm_play()
95 close(afd); in pcm_play()
199 int fd, afd; in wav_rec() local
224 afd = open("/dev/msm_pcm_in", O_RDWR); in wav_rec()
225 if (afd < 0) { in wav_rec()
232 if (ioctl(afd, AUDIO_GET_CONFIG, &cfg)) { in wav_rec()
239 if (ioctl(afd, AUDIO_SET_CONFIG, &cfg)) { in wav_rec()
244 if (ioctl(afd, AUDIO_GET_CONFIG, &cfg)) { in wav_rec()
256 if (ioctl(afd, AUDIO_START, 0)) { in wav_rec()
268 if (read(afd, buf, sz) != (ssize_t) sz) { in wav_rec()
280 close(afd); in wav_rec()
291 close(afd); in wav_rec()
301 int fd, afd; in mp3_play() local
309 afd = open("/dev/msm_mp3", O_RDWR); in mp3_play()
310 if (afd < 0) { in mp3_play()
317 ioctl(afd, AUDIO_START, 0); in mp3_play()
322 r = write(afd, buf, r); in mp3_play()
327 close(afd); in mp3_play()