Lines Matching refs:afd
46 int afd; in pcm_play() local
48 afd = open("/dev/msm_pcm_out", O_RDWR); in pcm_play()
49 if (afd < 0) { in pcm_play()
54 if(ioctl(afd, AUDIO_GET_CONFIG, &config)) { in pcm_play()
61 if (ioctl(afd, AUDIO_SET_CONFIG, &config)) { in pcm_play()
75 if (write(afd, buf, sz) != sz) in pcm_play()
80 ioctl(afd, AUDIO_START, 0); in pcm_play()
84 if (ioctl(afd, AUDIO_GET_STATS, &stats) == 0) in pcm_play()
89 if (write(afd, buf, sz) != sz) in pcm_play()
94 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) != 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()