Fixed sample rate not set correctly under slave I2S mode.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@530 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2010-03-24 03:20:20 +00:00
parent acd0943ff8
commit 3a72099612
1 changed files with 349 additions and 347 deletions

View File

@ -481,7 +481,9 @@ static rt_err_t codec_control(rt_device_t dev, rt_uint8_t cmd, void *args)
break; break;
case CODEC_CMD_SAMPLERATE: case CODEC_CMD_SAMPLERATE:
dev->close(dev);
sample_rate(*((int*) args)); sample_rate(*((int*) args));
dev->open(dev,0);
break; break;
case CODEC_CMD_EQ: case CODEC_CMD_EQ: