2009-05-19 16:34:03 Using TDM with AD1836 to play 44100Hz audio
Adam Rosenberg (UNITED STATES)
Message: 74285
I am trying to use the mp3play program to play 3 mp3 files that are encoded 16bit audio at 44.1Khz. Each file plays out of the correct channel using TDM but the sound is incorrect. It sounds slow and stutters.
I have determined that the problem is caused by the sample rate. When using vplay to play a WAV file at 48Khz, the audio plays correctly. When I play a WAV file at 44.1Khz it has the same problem as when playing the mp3 files.
It looks like mp3play is setting the frequency in the setdsp function using ioctl(dspfd, SNDCTL_DSP_SPEED, &mps->dec_frequency)
I cannot tell if this is a driver bug, kernel configuration problem, or problem with the way mp3play and vplay access the frequency setting of the sound card.
How do I fix this problem?
Thanks,
Adam
QuoteReplyEditDelete
2009-05-19 18:19:18 Re: Using TDM with AD1836 to play 44100Hz audio
Mike Frysinger (UNITED STATES)
Message: 74290
the AD1836 driver only supports 48kHz, so any other frequency means the kernel needs to resample it from whatever to 48kHz. that isnt going to be fast at all.
QuoteReplyEditDelete
2009-05-20 10:08:14 Re: Using TDM with AD1836 to play 44100Hz audio
Adam Rosenberg (UNITED STATES)
Message: 74333
Mike,
If the driver only supports 48Khz, does that mean that the driver is missing the ability to switch to other sampe rates or that the driver could not be written to support other sample rates?
As in previous posts from Jim Carstensen, I am trying to get the BF537 STAMP to work with the STAMP-AD1836 v0.9 and perform just as it did with the kernel image that Robin provided. My understanding is that audio files at any sample rate should play correctly, even if it means extra processing time for the sample rate conversion.
That said, what is the solution to this problem?
Thanks,
Adam
QuoteReplyEditDelete
2009-05-20 11:15:30 Re: Using TDM with AD1836 to play 44100Hz audio
Bernd Schmidt (GERMANY)
Message: 74337
I have some sample rate conversion code for the Blackfin that I adapted for uClinux. It's been posted on the uclinux-dist-devel list.
thread.gmane.org/gmane.linux.hardware.blackfin.kernel.devel/790/focus=813
QuoteReplyEditDelete