未验证 提交 8b4f55a3 编写于 作者: D David Lin 提交者: GitHub

Fixed spelling mistakes of code in drv_sound.c

macro error:  
	PL041_CHANNLE_LEFT_DAC  -> PL041_CHANNEL_LEFT_DAC
	PL041_CHANNLE_RIGHT_DAC  ->  PL041_CHANNEL_RIGHT_DAC
	PL041_CHANNLE_LEFT_ADC   -> PL041_CHANNEL_LEFT_ADC
	PL041_CHANNLE_RIGHT_ADC  -> PL041_CHANNEL_RIGHT_ADC             
parameter error:
	channle -> channel
functions error:
	aaci_pl041_channle_disable -> aaci_pl041_channel_disable
	aaci_pl041_channle_enable -> aaci_pl041_channel_enable
	aaci_pl041_channle_write -> aaci_pl041_channel_write
	aaci_pl041_channle_cfg -> aaci_pl041_channel_cfg
上级 8a3b6b1d
...@@ -227,13 +227,13 @@ static rt_err_t sound_init(struct rt_audio_device *audio) ...@@ -227,13 +227,13 @@ static rt_err_t sound_init(struct rt_audio_device *audio)
aaci_pl041_init(); aaci_pl041_init();
_cfg.itype = PL041_CHANNLE_LEFT_ADC | PL041_CHANNLE_RIGHT_ADC; _cfg.itype = PL041_CHANNEL_LEFT_ADC | PL041_CHANNEL_RIGHT_ADC;
_cfg.otype = PL041_CHANNLE_LEFT_DAC | PL041_CHANNLE_RIGHT_DAC; _cfg.otype = PL041_CHANNEL_LEFT_DAC | PL041_CHANNEL_RIGHT_DAC;
_cfg.vol = snd_dev->volume; _cfg.vol = snd_dev->volume;
_cfg.rate = snd_dev->replay_config.samplerate; _cfg.rate = snd_dev->replay_config.samplerate;
ac97_reset(); ac97_reset();
aaci_pl041_channle_cfg(0, &_cfg); aaci_pl041_channel_cfg(0, &_cfg);
aaci_pl041_irq_register(0, rt_hw_aaci_isr, RT_NULL); aaci_pl041_irq_register(0, rt_hw_aaci_isr, RT_NULL);
return result; return result;
...@@ -246,7 +246,7 @@ static rt_err_t sound_start(struct rt_audio_device *audio, int stream) ...@@ -246,7 +246,7 @@ static rt_err_t sound_start(struct rt_audio_device *audio, int stream)
if (stream == AUDIO_STREAM_REPLAY) if (stream == AUDIO_STREAM_REPLAY)
{ {
LOG_D("open sound device"); LOG_D("open sound device");
aaci_pl041_channle_enable(0); aaci_pl041_channel_enable(0);
aaci_pl041_irq_enable(0, AACI_IE_UR | AACI_IE_TX | AACI_IE_TXC); aaci_pl041_irq_enable(0, AACI_IE_UR | AACI_IE_TX | AACI_IE_TXC);
} }
...@@ -263,7 +263,7 @@ static rt_err_t sound_stop(struct rt_audio_device *audio, int stream) ...@@ -263,7 +263,7 @@ static rt_err_t sound_stop(struct rt_audio_device *audio, int stream)
rt_thread_mdelay(100); rt_thread_mdelay(100);
/* disable irq and channels 0 */ /* disable irq and channels 0 */
aaci_pl041_irq_disable(0, AACI_IE_UR | AACI_IE_TX | AACI_IE_TXC); aaci_pl041_irq_disable(0, AACI_IE_UR | AACI_IE_TX | AACI_IE_TXC);
aaci_pl041_channle_disable(0); aaci_pl041_channel_disable(0);
LOG_D("close sound device"); LOG_D("close sound device");
} }
...@@ -295,7 +295,7 @@ static rt_size_t sound_transmit(struct rt_audio_device *audio, const void *write ...@@ -295,7 +295,7 @@ static rt_size_t sound_transmit(struct rt_audio_device *audio, const void *write
RT_ASSERT(audio != RT_NULL); RT_ASSERT(audio != RT_NULL);
/* write data to channel_0 fifo */ /* write data to channel_0 fifo */
aaci_pl041_channle_write(0, (rt_uint16_t *)writeBuf, size >> 1); aaci_pl041_channel_write(0, (rt_uint16_t *)writeBuf, size >> 1);
return size; return size;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册