diff --git a/firmware/common/wm8731.cpp b/firmware/common/wm8731.cpp index 68086d66..2965ad26 100644 --- a/firmware/common/wm8731.cpp +++ b/firmware/common/wm8731.cpp @@ -25,6 +25,18 @@ namespace wolfson { namespace wm8731 { +void WM8731::configure_interface_i2s_slave() { + write(DigitalAudioInterfaceFormat { + .format = 2, + .iwl = 0, + .lrp = 0, + .lrswap = 0, + .ms = 0, + .bclkinv = 0, + .reserved0 = 0, + }); +} + void WM8731::init() { reset(); @@ -49,15 +61,7 @@ void WM8731::init() { // .reserved0 = 0, // }); - write(DigitalAudioInterfaceFormat { - .format = 2, - .iwl = 0, - .lrp = 0, - .lrswap = 0, - .ms = 0, - .bclkinv = 0, - .reserved0 = 0, - }); + configure_interface_i2s_slave(); write(DigitalAudioPathControl { .adchpd = 0, diff --git a/firmware/common/wm8731.hpp b/firmware/common/wm8731.hpp index b2c52778..f4128658 100644 --- a/firmware/common/wm8731.hpp +++ b/firmware/common/wm8731.hpp @@ -375,6 +375,8 @@ private: RegisterMap map { default_after_reset }; volume_t headphone_volume = -60.0_dB; + void configure_interface_i2s_slave(); + bool write(const Register reg); bool write(const address_t reg_address, const reg_t value);