Hi all
I am using linux2.6.8 and Ep9302 , and trying to build a sound application. I want to know dose the OSS Driver in Linux 2.6.8 for Ep9302’s I2S support 24-bits and 32-bits sound ?
I am trying to set the SNDCTL_DSP_SETFMT to AFMT_S32_LE (0x00008000) , and it does not work.
It works:
i =AFMT_S16_LE;//0x00000010
if ( ( r = ioctl( sound_dev, SNDCTL_DSP_SETFMT, &i ) ) < 0 ) { printf( " setfmt error! " ); return; }
printf( "afmt = %i, result = %i (%i)\n",AFMT_S16_LE i, r );
if(i != AFMT_S16_LE) { perror("setfmt"); return; }
It does not work, and i return 8. :
i = AFMT_S32_LE;//
if ( ( r = ioctl( sound_dev, SNDCTL_DSP_SETFMT, &i ) ) < 0 ) { printf( " setfmt error! " ); return; }
printf( "afmt = %i, result = %i (%i)\n", AFMT_S32_LE, i, r );
if(i != AFMT_S32_LE) { perror("setfmt"); return; }