Remove i2c chanend argument from config functions.

This commit is contained in:
Russell
2011-11-17 15:17:26 +00:00
parent 9a3b011c95
commit 36246a4f2d
5 changed files with 12 additions and 14 deletions

View File

@@ -12,9 +12,7 @@
* receiving/transmitting samples * receiving/transmitting samples
* \param c_config An optional channel that will be passed on to the * \param c_config An optional channel that will be passed on to the
* CODEC configuration functions. * CODEC configuration functions.
* \param c_i2c An optional channel that will be passed on to the
* functions requiring i2c.
*/ */
void audio(chanend c_in, chanend ?c_dig, chanend ?c_config, chanend ?c_i2c); void audio(chanend c_in, chanend ?c_dig, chanend ?c_config);
#endif // __audio_h__ #endif // __audio_h__

View File

@@ -496,7 +496,7 @@ static unsigned dummy_deliver(chanend c_out) {
return 0; return 0;
} }
void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i2c) void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config)
{ {
#ifdef SPDIF #ifdef SPDIF
chan c_spdif_out; chan c_spdif_out;
@@ -511,10 +511,10 @@ void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i
#endif #endif
/* Initialise master clock generation */ /* Initialise master clock generation */
ClockingInit(c_i2c); ClockingInit();
/* Perform required CODEC/ADC/DAC initialisation */ /* Perform required CODEC/ADC/DAC initialisation */
CodecInit(c_config, c_i2c); CodecInit(c_config);
while(1) while(1)
{ {
@@ -533,7 +533,7 @@ void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i
divide = mClk / ( curSamFreq * 64 ); divide = mClk / ( curSamFreq * 64 );
/* Configure clocking for required master clock */ /* Configure clocking for required master clock */
ClockingConfig(mClk, c_i2c); ClockingConfig(mClk);
if(!firstRun) if(!firstRun)
{ {
@@ -553,7 +553,7 @@ void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c_i
firstRun = 0; firstRun = 0;
/* Configure CODEC/DAC/ADC for SampleFreq/MClk */ /* Configure CODEC/DAC/ADC for SampleFreq/MClk */
CodecConfig(curSamFreq, mClk, c_config, c_i2c); CodecConfig(curSamFreq, mClk, c_config);
/* Configure audio ports */ /* Configure audio ports */
ConfigAudioPorts(divide); ConfigAudioPorts(divide);

View File

@@ -5,10 +5,10 @@
/* Functions that handle master clock generation. These need modifying for an existing design */ /* Functions that handle master clock generation. These need modifying for an existing design */
/* Any initialisation required for master clock generation - run once at start up */ /* Any initialisation required for master clock generation - run once at start up */
void ClockingInit(chanend ?c); void ClockingInit(void);
/* Configuration for a specific master clock frequency - run every sample frequency change */ /* Configuration for a specific master clock frequency - run every sample frequency change */
void ClockingConfig(unsigned mClkFreq, chanend ?c); void ClockingConfig(unsigned mClkFreq);
/** Clock generation and digital audio I/O handling. /** Clock generation and digital audio I/O handling.

View File

@@ -6,9 +6,9 @@
/* TODO Are the channel args required? */ /* TODO Are the channel args required? */
/* Any required CODEC initialisation - run once at start up */ /* Any required CODEC initialisation - run once at start up */
void CodecInit(chanend ?c_codec, chanend ?c_i2c); void CodecInit(chanend ?c_codec);
/* Configure condec for a specific mClk/Sample frquency - run on every sample frequency change */ /* Configure condec for a specific mClk/Sample frquency - run on every sample frequency change */
void CodecConfig(unsigned samFreq, unsigned mClk, chanend ?c_codec, chanend ?c_i2c); void CodecConfig(unsigned samFreq, unsigned mClk, chanend ?c_codec);
#endif #endif

View File

@@ -1,4 +1,4 @@
void PllInit(chanend c); void PllInit(void);
void PllMult(unsigned mult, chanend c); void PllMult(unsigned mult);