SAMA5D4-EK/nsh: WM8904 support enabled; README updated

This commit is contained in:
Gregory Nutt 2014-09-18 14:29:20 -06:00
parent e8b5a8e0d6
commit 942aaf6c31
3 changed files with 92 additions and 12 deletions

View File

@ -103,7 +103,7 @@
# if defined(CONFIG_SAMA5_HAVE_XDMA)
# if !defined(CONFIG_SAMA5_XDMAC0) && !defined(CONFIG_SAMA5_XDMAC1)
# error CONFIG_SAMA5_XDMAC1 (or XDMAC0) required by SSC0
# error CONFIG_SAMA5_XDMAC0 or XDMAC1 required by SSC0
# endif
# else
# if !defined(CONFIG_SAMA5_DMAC0)

View File

@ -4460,6 +4460,9 @@ Configurations
nxplayer> device pcm0
nxplayer> play <filename>
STATUS: Not yet functional. See the To-Do list at the bottom of this
README file.
20. The SAMA5D4-EK includes for an AT25 serial DataFlash. That support is
NOT enabled in this configuration. Support for that serial FLASH could
be enabled by modifying the NuttX configuration as described above in
@ -4689,6 +4692,12 @@ Configurations
new one, you should see the .WAV files on the SD card in the lis
box.
STATUS: Despite the comments above, WM8904 support has *NOT* yet
been enabled in this configuration. This is because it is not yet
working in the nxwm configuration. See the To-Do list at the
bottom of this README file. The current nxwm configuration is still
set up for the Rev C board using the "NULL" audio device.
Things still to do:
a. Currently the list box is not scrollable. So you will be
@ -4815,3 +4824,41 @@ To-Do List
for the PWM and the Timer/Counter drivers. These drivers use the
BOARD_MCK_FREQUENCY definition in more complex ways and will require some
minor redesign and re-testing before they can be available.
5) The WM8904 is not usable on the Rev C version of the board due to some I2C
related issues. These issues seem to be resolved on the Rev E version of
the board. However, the WM8904 is still not function:
a) With a logic analyzer I can see that the I2C writes to the WM8904
device look good. This is the same setup that was used in the working
SAMA5D3x-EK nxplayer configuration and so should be correct (you cannot
even get this far on the Rev C board).
b) I2C readback of the WM8904 registers (via CONFIG_WM8904_REGDUMP) does
not, however, show proper registers contents. Groups of extra bits
(apparently 0x01fd) appear to be set in many registers on reading.
This is assumed to be some interference from some other device on the
I2C bus rather that errors in writing. This assumption is credible
since the bad bits appear immediately after resetting the WM8904 and
before anything has been written to it.
c) Also with the logic analyzer, I can that the 12MHz MCLK input is
being provided to the WM8904.
d) However, not bit clock (BLCK) is being generated by the WM8904. This
should appear on both AUDIO_TK0_PB27 and AUDIO_RK0_PB28, but I see
nothing.
e) With no BCLK, I would expect the SSC0 DMA transfers to hang... they do
not. No errors of any kind are detected by the firmware; it believes
that it is successfully playing .WAV files. This leads to believe
that there may be some schematic error.
e) There is, of course, no audio output.
You can replace the WM8904 with the "NULL" audio driver by:
CONFIG_AUDIO_WM8904=n : Disable the WM8904
CONFIG_SAMA5_SSC0=n : Disable SSC0
CONFIG_AUDIO_NULL=y : Enable the NULL audio device
CONFIG_AUDIO_NULL_BUFFER_SIZE=8192
CONFIG_AUDIO_NULL_MSG_PRIO=1
CONFIG_AUDIO_NULL_NUM_BUFFERS=4
CONFIG_AUDIO_NULL_WORKER_STACKSIZE=768
CONFIG_AUDIO_NUM_BUFFERS=2

View File

@ -218,7 +218,7 @@ CONFIG_SAMA5_EMAC0=y
# CONFIG_SAMA5_EMAC1 is not set
CONFIG_SAMA5_LCDC=y
# CONFIG_SAMA5_ISI is not set
# CONFIG_SAMA5_SSC0 is not set
CONFIG_SAMA5_SSC0=y
# CONFIG_SAMA5_SSC1 is not set
# CONFIG_SAMA5_SHA is not set
CONFIG_SAMA5_TRNG=y
@ -295,6 +295,32 @@ CONFIG_SAMA5_EMAC0_ISETH0=y
#
CONFIG_SAMA5_TWI0_FREQUENCY=100000
#
# SSC Configuration
#
CONFIG_SAMA5_SSC_MAXINFLIGHT=16
#
# SSC0 Configuration
#
CONFIG_SAMA5_SSC0_DATALEN=16
CONFIG_SAMA5_SSC0_RX=y
CONFIG_SAMA5_SSC0_RX_RKINPUT=y
# CONFIG_SAMA5_SSC0_RX_TXCLK is not set
# CONFIG_SAMA5_SSC0_RX_MCKDIV is not set
CONFIG_SAMA5_SSC0_RX_FSLEN=1
CONFIG_SAMA5_SSC0_RX_STTDLY=1
CONFIG_SAMA5_SSC0_TX=y
# CONFIG_SAMA5_SSC0_TX_TKINPUT is not set
CONFIG_SAMA5_SSC0_TX_RXCLK=y
# CONFIG_SAMA5_SSC0_TX_MCKDIV is not set
CONFIG_SAMA5_SSC0_TX_TKOUTPUT_NONE=y
# CONFIG_SAMA5_SSC0_TX_TKOUTPUT_CONT is not set
# CONFIG_SAMA5_SSC0_TX_TKOUTPUT_XFR is not set
CONFIG_SAMA5_SSC0_TX_FSLEN=0
CONFIG_SAMA5_SSC0_TX_STTDLY=1
# CONFIG_SAMA5_SSC0_LOOPBACK is not set
#
# HSMCI device driver options
#
@ -416,8 +442,8 @@ CONFIG_NSH_MMCSDSLOTNO=0
#
# Board-Specific Options
#
CONFIG_SAMA5D4_MB_REVC=y
# CONFIG_SAMA5D4_MB_REVE is not set
# CONFIG_SAMA5D4_MB_REVC is not set
CONFIG_SAMA5D4_MB_REVE=y
# CONFIG_SAMA5D4EK_384MHZ is not set
# CONFIG_SAMA5D4EK_396MHZ is not set
CONFIG_SAMA5D4EK_528MHZ=y
@ -432,6 +458,9 @@ CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT_UDELAY=2000
CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY=400000
CONFIG_SAMA5D4EK_MXT_DEVMINOR=0
# CONFIG_SAMA5D4EK_SLOWCLOCK is not set
CONFIG_SAMA5D4EK_WM8904_I2CFREQUENCY=400000
CONFIG_SAMA5D4EK_WM8904_SRCMAIN=y
# CONFIG_SAMA5D4EK_WM8904_SRCSCK is not set
#
# RTOS Features
@ -565,12 +594,16 @@ CONFIG_RTC_DATETIME=y
CONFIG_AUDIO_DEVICES=y
# CONFIG_AUDIO_I2SCHAR is not set
# CONFIG_VS1053 is not set
# CONFIG_AUDIO_WM8904 is not set
CONFIG_AUDIO_NULL=y
CONFIG_AUDIO_NULL_MSG_PRIO=1
CONFIG_AUDIO_NULL_BUFFER_SIZE=8192
CONFIG_AUDIO_NULL_NUM_BUFFERS=4
CONFIG_AUDIO_NULL_WORKER_STACKSIZE=768
CONFIG_AUDIO_WM8904=y
CONFIG_WM8904_INITVOLUME=250
CONFIG_WM8904_INFLIGHT=2
CONFIG_WM8904_MSG_PRIO=1
CONFIG_WM8904_BUFFER_SIZE=8192
CONFIG_WM8904_NUM_BUFFERS=8
CONFIG_WM8904_WORKER_STACKSIZE=1536
# CONFIG_WM8904_REGDUMP is not set
# CONFIG_WM8904_CLKDEBUG is not set
# CONFIG_AUDIO_NULL is not set
# CONFIG_VIDEO_DEVICES is not set
# CONFIG_BCH is not set
CONFIG_INPUT=y
@ -948,7 +981,7 @@ CONFIG_AUDIO=y
# Audio Buffer Configuration
#
# CONFIG_AUDIO_LARGE_BUFFERS is not set
CONFIG_AUDIO_NUM_BUFFERS=2
CONFIG_AUDIO_NUM_BUFFERS=8
CONFIG_AUDIO_BUFFER_NUMBYTES=8192
# CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS is not set
@ -1369,7 +1402,7 @@ CONFIG_SYSTEM_NXPLAYER=y
CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500
CONFIG_NXPLAYER_COMMAND_LINE=y
CONFIG_NXPLAYER_INCLUDE_HELP=y
# CONFIG_NXPLAYER_INCLUDE_DEVICE_SEARCH is not set
CONFIG_NXPLAYER_INCLUDE_DEVICE_SEARCH=y
CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE=y
CONFIG_NXPLAYER_FMT_FROM_EXT=y
# CONFIG_NXPLAYER_FMT_FROM_HEADER is not set