This file contains the implementation of the SSI driver main services. More...
This file contains the implementation of the SSI driver main services.
unsigned int get_ssi_fifo_addr | ( | unsigned int | ssi, | |
int | direction | |||
) |
This function gets the SSI fifo address.
ssi | ssi number | |
direction | To indicate playback / recording |
References MXC_SSI1STX0, MXC_SSI2STX0, and SSI1.
void ssi_ac97_frame_rate_divider | ( | ssi_mod | module, | |
unsigned char | frame_rate_divider | |||
) |
This function controls the AC97 frame rate divider.
module | the module number | |
frame_rate_divider | the AC97 frame rate divider |
unsigned int ssi_ac97_get_command_address_register | ( | ssi_mod | module | ) |
This function gets the AC97 command address register.
module | the module number |
unsigned int ssi_ac97_get_command_data_register | ( | ssi_mod | module | ) |
This function gets the AC97 command data register.
module | the module number |
unsigned int ssi_ac97_get_tag_register | ( | ssi_mod | module | ) |
This function gets the AC97 tag register.
module | the module number |
void ssi_ac97_mode_enable | ( | ssi_mod | module, | |
bool | state | |||
) |
This function controls the AC97 mode.
module | the module number | |
state | the AC97 mode state (enabled or disabled) |
References AC97_MODE_ENABLE_SHIFT.
void ssi_ac97_read_command | ( | ssi_mod | module, | |
bool | state | |||
) |
This function controls the AC97 read command.
module | the module number | |
state | the next AC97 command is a read command or not |
void ssi_ac97_set_command_address_register | ( | ssi_mod | module, | |
unsigned int | address | |||
) |
This function sets the AC97 command address register.
module | the module number | |
address | the command address slot information |
void ssi_ac97_set_command_data_register | ( | ssi_mod | module, | |
unsigned int | data | |||
) |
This function sets the AC97 command data register.
module | the module number | |
data | the command data slot information |
void ssi_ac97_set_tag_register | ( | ssi_mod | module, | |
unsigned int | tag | |||
) |
This function sets the AC97 tag register.
module | the module number | |
tag | the tag information |
void ssi_ac97_tag_in_fifo | ( | ssi_mod | module, | |
bool | state | |||
) |
This function controls the AC97 tag in FIFO behavior.
module | the module number | |
state | the tag in fifo behavior (Tag info stored in Rx FIFO 0 if true, Tag info stored in SATAG register otherwise) |
void ssi_ac97_variable_mode | ( | ssi_mod | module, | |
bool | state | |||
) |
This function controls the AC97 variable mode.
module | the module number | |
state | the AC97 variable mode state (enabled or disabled) |
void ssi_ac97_write_command | ( | ssi_mod | module, | |
bool | state | |||
) |
This function controls the AC97 write command.
module | the module number | |
state | the next AC97 command is a write command or not |
void ssi_clock_idle_state | ( | ssi_mod | module, | |
idle_state | state | |||
) |
This function controls the idle state of the transmit clock port during SSI internal gated mode.
module | the module number | |
state | the clock idle state |
void ssi_clock_off | ( | ssi_mod | module, | |
bool | state | |||
) |
This function turns off/on the ccm_ssi_clk to reduce power consumption.
module | the module number | |
state | the state for ccm_ssi_clk (true: turn off, else:turn on) |
void ssi_enable | ( | ssi_mod | module, | |
bool | state | |||
) |
This function enables/disables the SSI module.
module | the module number | |
state | the state for SSI module |
References SSI_ENABLE_SHIFT.
static void __exit ssi_exit | ( | void | ) | [static] |
This function implements the exit function of the SPI device. This function is called when the module is unloaded.
This function gets the data word in the Receive FIFO of the SSI module.
module | the module number | |
fifo | the Receive FIFO to read |
References ssi_fifo_0.
ssi_status_enable_mask ssi_get_status | ( | ssi_mod | module | ) |
This function returns the status of the SSI module (SISR register) as a combination of status.
module | the module number |
This function selects the I2S mode of the SSI module.
module | the module number | |
mode | the I2S mode |
static int __init ssi_init | ( | void | ) | [static] |
This function implements the init function of the SSI device. This function is called when the module is loaded.
void ssi_interrupt_disable | ( | ssi_mod | module, | |
ssi_status_enable_mask | mask | |||
) |
This function disables the interrupts of the SSI module.
module | the module number | |
mask | the mask of the interrupts to disable |
void ssi_interrupt_enable | ( | ssi_mod | module, | |
ssi_status_enable_mask | mask | |||
) |
This function enables the interrupts of the SSI module.
module | the module number | |
mask | the mask of the interrupts to enable |
void ssi_network_mode | ( | ssi_mod | module, | |
bool | state | |||
) |
This function enables/disables the network mode of the SSI module.
module | the module number | |
state | the network mode state |
static int __init ssi_probe | ( | struct platform_device * | pdev | ) | [static] |
This function initializes the driver in terms of memory of the soundcard and some basic HW clock settings.
void ssi_receive_enable | ( | ssi_mod | module, | |
bool | state | |||
) |
This function enables/disables the receive section of the SSI module.
module | the module number | |
state | the receive section state |
void ssi_rx_bit0 | ( | ssi_mod | module, | |
bool | state | |||
) |
This function configures the SSI module to receive data word at bit position 0 or 23 in the Receive shift register.
module | the module number | |
state | the state to receive at bit 0 |
void ssi_rx_clock_direction | ( | ssi_mod | module, | |
ssi_tx_rx_direction | direction | |||
) |
This function controls the source of the clock signal used to clock the Receive shift register.
module | the module number | |
direction | the clock signal direction |
void ssi_rx_clock_divide_by_two | ( | ssi_mod | module, | |
bool | state | |||
) |
This function configures the divide-by-two divider of the SSI module for the receive section.
module | the module number | |
state | the divider state |
void ssi_rx_clock_polarity | ( | ssi_mod | module, | |
ssi_tx_rx_clock_polarity | polarity | |||
) |
This function controls which bit clock edge is used to clock in data.
module | the module number | |
polarity | the clock polarity |
void ssi_rx_clock_prescaler | ( | ssi_mod | module, | |
bool | state | |||
) |
This function configures a fixed divide-by-eight clock prescaler divider of the SSI module in series with the variable prescaler for the receive section.
module | the module number | |
state | the prescaler state |
void ssi_rx_early_frame_sync | ( | ssi_mod | module, | |
ssi_tx_rx_early_frame_sync | early | |||
) |
This function controls the early frame sync configuration.
module | the module number | |
early | the early frame sync configuration |
References SSI_EARLY_FRAME_SYNC_SHIFT.
This function gets the number of data words in the Receive FIFO.
module | the module number | |
fifo | the fifo |
References ssi_fifo_0, and SSI_RX_FIFO_1_COUNT_SHIFT.
This function enables the Receive FIFO.
module | the module number | |
fifo | the fifo to enable | |
enable | the state of the fifo, enabled or disabled |
This function controls the threshold at which the RFFx flag will be set.
module | the module number | |
fifo | the fifo to enable | |
watermark | the watermark |
References ssi_fifo_0.
void ssi_rx_flush_fifo | ( | ssi_mod | module | ) |
This function flushes the Receive FIFOs.
module | the module number |
void ssi_rx_frame_direction | ( | ssi_mod | module, | |
ssi_tx_rx_direction | direction | |||
) |
This function controls the direction of the Frame Sync signal for the receive section.
module | the module number | |
direction | the Frame Sync signal direction |
int ssi_rx_frame_rate | ( | ssi_mod | module, | |
unsigned char | ratio | |||
) |
This function configures the Receive frame rate divider for the receive section.
module | the module number | |
ratio | the divide ratio from 1 to 32 |
void ssi_rx_frame_sync_active | ( | ssi_mod | module, | |
ssi_tx_rx_frame_sync_active | active | |||
) |
This function controls the Frame Sync active polarity for the receive section.
module | the module number | |
active | the Frame Sync active polarity |
void ssi_rx_frame_sync_length | ( | ssi_mod | module, | |
ssi_tx_rx_frame_sync_length | length | |||
) |
This function controls the Frame Sync length (one word or one bit long) for the receive section.
module | the module number | |
length | the Frame Sync length |
void ssi_rx_mask_time_slot | ( | ssi_mod | module, | |
unsigned int | mask | |||
) |
This function configures the time slot(s) to mask for the receive section.
module | the module number | |
mask | the mask to indicate the time slot(s) masked |
int ssi_rx_prescaler_modulus | ( | ssi_mod | module, | |
unsigned int | divider | |||
) |
This function configures the Prescale divider for the receive section.
module | the module number | |
divider | the divide ratio from 1 to 256 |
References SSI_PRESCALER_MODULUS_SHIFT.
void ssi_rx_shift_direction | ( | ssi_mod | module, | |
ssi_tx_rx_shift_direction | direction | |||
) |
This function controls whether the MSB or LSB will be received first in a sample.
module | the module number | |
direction | the shift direction |
void ssi_rx_word_length | ( | ssi_mod | module, | |
ssi_word_length | length | |||
) |
This function configures the Receive word length.
module | the module number | |
length | the word length |
This function sets the data word in the Transmit FIFO of the SSI module.
module | the module number | |
fifo | the FIFO number | |
data | the data to load in the FIFO |
References ssi_fifo_0.
void ssi_set_wait_states | ( | ssi_mod | module, | |
ssi_wait_states | wait | |||
) |
This function controls the number of wait states between the core and SSI.
module | the module number | |
wait | the number of wait state(s) |
void ssi_synchronous_mode | ( | ssi_mod | module, | |
bool | state | |||
) |
This function enables/disables the synchronous mode of the SSI module.
module | the module number | |
state | the synchronous mode state |
void ssi_system_clock | ( | ssi_mod | module, | |
bool | state | |||
) |
This function allows the SSI module to output the SYS_CLK at the SRCK port.
module | the module number | |
state | the system clock state |
void ssi_transmit_enable | ( | ssi_mod | module, | |
bool | state | |||
) |
This function enables/disables the transmit section of the SSI module.
module | the module number | |
state | the transmit section state |
void ssi_two_channel_mode | ( | ssi_mod | module, | |
bool | state | |||
) |
This function allows the SSI module to operate in the two channel mode.
module | the module number | |
state | the two channel mode state |
void ssi_tx_bit0 | ( | ssi_mod | module, | |
bool | state | |||
) |
This function configures the SSI module to transmit data word from bit position 0 or 23 in the Transmit shift register.
module | the module number | |
state | the transmit from bit 0 state |
void ssi_tx_clock_direction | ( | ssi_mod | module, | |
ssi_tx_rx_direction | direction | |||
) |
This function controls the direction of the clock signal used to clock the Transmit shift register.
module | the module number | |
direction | the clock signal direction |
void ssi_tx_clock_divide_by_two | ( | ssi_mod | module, | |
bool | state | |||
) |
This function configures the divide-by-two divider of the SSI module for the transmit section.
module | the module number | |
state | the divider state |
void ssi_tx_clock_polarity | ( | ssi_mod | module, | |
ssi_tx_rx_clock_polarity | polarity | |||
) |
This function controls which bit clock edge is used to clock out data.
module | the module number | |
polarity | the clock polarity |
void ssi_tx_clock_prescaler | ( | ssi_mod | module, | |
bool | state | |||
) |
This function configures a fixed divide-by-eight clock prescaler divider of the SSI module in series with the variable prescaler for the transmit section.
module | the module number | |
state | the prescaler state |
void ssi_tx_early_frame_sync | ( | ssi_mod | module, | |
ssi_tx_rx_early_frame_sync | early | |||
) |
This function controls the early frame sync configuration for the transmit section.
module | the module number | |
early | the early frame sync configuration |
References SSI_EARLY_FRAME_SYNC_SHIFT.
This function gets the number of data words in the Transmit FIFO.
module | the module number | |
fifo | the fifo |
References ssi_fifo_0.
This function controls the threshold at which the TFEx flag will be set.
module | the module number | |
fifo | the fifo to enable | |
watermark | the watermark |
References ssi_fifo_0.
This function enables the Transmit FIFO.
module | the module number | |
fifo | the fifo to enable | |
enable | the state of the fifo, enabled or disabled |
void ssi_tx_flush_fifo | ( | ssi_mod | module | ) |
This function flushes the Transmit FIFOs.
module | the module number |
void ssi_tx_frame_direction | ( | ssi_mod | module, | |
ssi_tx_rx_direction | direction | |||
) |
This function controls the direction of the Frame Sync signal for the transmit section.
module | the module number | |
direction | the Frame Sync signal direction |
int ssi_tx_frame_rate | ( | ssi_mod | module, | |
unsigned char | ratio | |||
) |
This function configures the Transmit frame rate divider.
module | the module number | |
ratio | the divide ratio from 1 to 32 |
void ssi_tx_frame_sync_active | ( | ssi_mod | module, | |
ssi_tx_rx_frame_sync_active | active | |||
) |
This function controls the Frame Sync active polarity for the transmit section.
module | the module number | |
active | the Frame Sync active polarity |
void ssi_tx_frame_sync_length | ( | ssi_mod | module, | |
ssi_tx_rx_frame_sync_length | length | |||
) |
This function controls the Frame Sync length (one word or one bit long) for the transmit section.
module | the module number | |
length | the Frame Sync length |
void ssi_tx_mask_time_slot | ( | ssi_mod | module, | |
unsigned int | mask | |||
) |
This function configures the time slot(s) to mask for the transmit section.
module | the module number | |
mask | the mask to indicate the time slot(s) masked |
int ssi_tx_prescaler_modulus | ( | ssi_mod | module, | |
unsigned int | divider | |||
) |
This function configures the Prescale divider for the transmit section.
module | the module number | |
divider | the divide ratio from 1 to 256 |
References SSI_PRESCALER_MODULUS_SHIFT.
void ssi_tx_shift_direction | ( | ssi_mod | module, | |
ssi_tx_rx_shift_direction | direction | |||
) |
This function controls whether the MSB or LSB will be transmitted first in a sample.
module | the module number | |
direction | the shift direction |
void ssi_tx_word_length | ( | ssi_mod | module, | |
ssi_word_length | length | |||
) |
This function configures the Transmit word length.
module | the module number | |
length | the word length |
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |