Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 0ebd0b1

Browse files
committed
Configure codec wm8994 to use internal clock
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 7a4a150 commit 0ebd0b1

File tree

1 file changed

+9
-1
lines changed
  • system/Drivers/BSP/Components/wm8994

1 file changed

+9
-1
lines changed

system/Drivers/BSP/Components/wm8994/wm8994.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,15 @@ uint32_t wm8994_Init(uint16_t DeviceAddr, uint16_t OutputInputDevice, uint8_t Vo
461461
counter += CODEC_IO_Write(DeviceAddr, 0x208, 0x000A);
462462

463463
/* Enable AIF1 Clock, AIF1 Clock Source = MCLK1 pin */
464-
counter += CODEC_IO_Write(DeviceAddr, 0x200, 0x0001);
464+
// counter += CODEC_IO_Write(DeviceAddr, 0x200, 0x0001);
465+
466+
/* select internal clock instead of MCLK1 */
467+
counter += CODEC_IO_Write(DeviceAddr, 0x224, 0x0003);
468+
counter += CODEC_IO_Write(DeviceAddr, 0x220, 0x0001);
469+
counter += CODEC_IO_Write(DeviceAddr, 0x221, 0x0F00);
470+
counter += CODEC_IO_Write(DeviceAddr, 0x222, 0x0000);
471+
counter += CODEC_IO_Write(DeviceAddr, 0x223, 0x0400);
472+
counter += CODEC_IO_Write(DeviceAddr, 0x200, 0x0011);
465473

466474
if (output_device > 0) /* Audio output selected */
467475
{

0 commit comments

Comments
 (0)