Created
March 18, 2014 01:40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <hwdep.h> | |
#include <error.h> | |
#include <stdio.h> | |
#include "rt56xx_ioctl.h" | |
int main() | |
{ | |
snd_hwdep_t *hwdep; | |
int err; | |
int i; | |
struct rt56xx_cmd cmd; | |
int buf[0x80]; | |
cmd.buf = &buf; | |
if ((err = snd_hwdep_open(&hwdep, "hw:3,0", O_RDWR)) < 0) { | |
printf("snd_hwdep open failed! %s\n",snd_strerror(err)); | |
return -1; | |
} | |
if ((err = snd_hwdep_ioctl(hwdep,RT_READ_ALL_CODEC_REG_IOCTL, &cmd)) < 0 ) { | |
printf("snd_hwdep ioctl failed! %s\n",snd_strerror(err)); | |
return -1; | |
} | |
for(i=0;i<0x80;i++){ | |
printf("%03X, %08X\n",i,buf[i]); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment