Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/board/rtl8730e: add driver layer implemenation for i2s tdm #6541

Draft
wants to merge 3 commits into
base: TDM_Dev
Choose a base branch
from

Conversation

lhenry-realtek
Copy link
Contributor

@lhenry-realtek lhenry-realtek commented Nov 27, 2024

Add initial porting/os layer commit

  • TDM parameters fixed on I2S2 to generate required signal for AIS25BA
  • DMA is not tested and likely requires further implementation

Config:

- RTL8730E Peripheral Support:
    [*] AMEBASMART_I2C
    [*] Amebasmart I2S
    [*] I2S_2
    [*] Enable I2S RX
    [ ] Enable I2S TX
    [*] Enable I2S TDM Support
- Device Drivers:
    [*] I2C Driver Support
    [*] I2S Driver Support

Add initial porting/os layer commit
- TDM parameters fixed on I2S2 to generate required signal for AIS25BA
- DMA is not tested and likely requires further implementation

Config:
- RTL8730E Peripheral Support:
    [ ] AMEBASMART_I2C
    [*] Amebasmart I2S
    [*] I2S_2
    [*] Enable I2S RX
    [*] Enable I2S TDM Support
- Device Drivers:
    [ ] I2C Driver Support
    [*] I2S Driver Support
- Application Configuration > Examples:
    [*] I2S character driver test
    [*] Use I2S receiver
    [ ] Use I2S transmitter
    /dev/i2schar4 I2S character device path
Fix clock selection parameters to get targeted signal value:
MCLK = 12.288MHz (OK)
BCLK = 2.048MHz (OK)
WCLK (need to setup Rx api in order to trigger WCLK activity)
@lhenry-realtek
Copy link
Contributor Author

MCLK/BCLK signal observed with LA and verified to be within parameters
WCLK is currently not generated as full RX api is not done yet as of 110a416

- WCLK was not started because there was no I2S and DMA transaction being started, added calls to relevant APIs
- Currently DMA for I2S TDM is not properly initialized and will hardfault when rx page, currently under investigation
- User is required to call I2S_RESUME and I2S_PAUSE macros when attempting a TDM operation (e.g READ), as these macros will start WCLK (for MASTER mode)
- Add some debug logging and revert changes to irrelevant files
@lhenry-realtek
Copy link
Contributor Author

Logic_mcpxc0K5UQ

BCLK(green) is 2.048MHz, WCLK(blue) is properly generated at 16kHz when I2S_RESUME is called before an I2S_READ. The break at the end is due to hardfault, which is currently being investigated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants