libpynq (release 5EWC0-2023 version 0.2.6 of 2023-10-24 17:28)
Loading...
Searching...
No Matches
audio.c File Reference
#include "audio.h"
#include <libpynq.h>
#include <stdint.h>
#include "i2cps.h"
#include "uio.h"
#include <fcntl.h>
#include <linux/i2c-dev.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
Include dependency graph for audio.c:

Go to the source code of this file.

Macros

#define SAMPLE_RATE   44100
 
#define LOG_DOMAIN   "audio"
 

Functions

void audio_init (void)
 
void audio_select_input (int input)
 
void write_audio_reg (unsigned char u8RegAddr, unsigned char u8Data, int iic_fd)
 
void config_audio_pll (void)
 
void config_audio_codec (void)
 
void select_line_in (void)
 
void select_mic (void)
 
void deselect (void)
 
void audio_bypass (unsigned int audio_mmap_size, unsigned int nsamples, unsigned int volume, int uio_index)
 
void audio_record (unsigned int audio_mmap_size, unsigned int *BufAddr, unsigned int nsamples, int uio_index)
 
void audio_play (unsigned int audio_mmap_size, unsigned int *BufAddr, unsigned int nsamples, unsigned int volume, int uio_index)
 
void audio_repeat_play (unsigned int audio_mmap_size, unsigned int *BufAddr, unsigned int nsamples, unsigned int volume, unsigned int repetitions)
 
void audio_generate_tone (unsigned int frequency, uint32_t time_ms, unsigned int volume)
 

Macro Definition Documentation

◆ LOG_DOMAIN

#define LOG_DOMAIN   "audio"

Definition at line 70 of file audio.c.

◆ SAMPLE_RATE

#define SAMPLE_RATE   44100

Definition at line 67 of file audio.c.