SAMA5D4 NxWM: Configuration now has the audio subsystem and the NxPlayer enabled

This commit is contained in:
Gregory Nutt 2014-07-23 15:20:54 -06:00
parent 68109b32db
commit 8621769516
3 changed files with 157 additions and 63 deletions

View File

@ -3443,13 +3443,6 @@ Configurations
example requires is a touch in the far, far, upper left corner of
the display. In that region, I cannot get reliable touch measurements
and so I cannot get past the opening display.
f) The NxWM example was designed tiny displays. On this large 800x480
display, the icons are too tiny to be usable. I have created a large
320x320 logo for the opening screen and added image scaling to expand
the images in the taskbar. The expanded images are not great. If I
ever get past the opening screen, the same problems will exist in the
application toolbar and in the start window. These icons are not yet
scaled.
Bottom line: Not ready for prime time.
@ -3496,25 +3489,21 @@ To-Do List
just do not have a good test bed (or sufficient CAN knowledge) for
good CAN testing.
7) The NxWM example does not work well. This example was designed to work
with much smaller displays and does not look good or work well with the
SAMA5D3x-EK's 800x480 display. See above for details.
8) There are lots of LCDC hardware features that are not tested with NuttX.
7) There are lots of LCDC hardware features that are not tested with NuttX.
The simple NuttX graphics system does not have support for all of the
layers and other features of the LCDC.
9) I have a Camera, but there is still no ISI driver. I am not sure what to
8) I have a Camera, but there is still no ISI driver. I am not sure what to
do with the camera. NuttX needs something like V4L to provide the
definition for what a camera driver is supposed to do.
I will probably develop a test harness for ISI, but it is of only
minimal value with no OS infrastructure to deal with images and video.
10) GMAC has only been tested on a 10/100Base-T network. I don't have a
1000Base-T network to support additional testing.
9) GMAC has only been tested on a 10/100Base-T network. I don't have a
1000Base-T network to support additional testing.
11) Some drivers may require some adjustments if you intend to run from SDRAM.
10) Some drivers may require some adjustments if you intend to run from SDRAM.
That is because in this case macros like BOARD_MCK_FREQUENCY are not constants
but are instead function calls: The MCK clock frequency is not known in
advance but instead has to be calculated from the bootloader PLL configuration.

View File

@ -2792,7 +2792,22 @@ Audio Support
The NxPlayer is a audio library and command line application for playing
audio file. The NxPlayer can be found at apps/system/nxplayer. If you
would like to add the NxPlayer, here are some recommended configuration
settings:
settings.
First of all, the NxPlayer depends on the NuttX audio subsystem. Here are some recommended settings for the audio subsystem:
Audio Support ->
CONFIG_AUDIO=y
CONFIG_AUDIO_NUM_BUFFERS=4
CONFIG_AUDIO_BUFFER_NUMBYTES=8192
CONFIG_AUDIO_FORMAT_PCM=y
CONFIG_AUDIO_NULL=y
CONFIG_AUDIO_NULL_BUFFER_SIZE=8192
CONFIG_AUDIO_NULL_MSG_PRIO=1
CONFIG_AUDIO_NULL_WORKER_STACKSIZE=768
Then the NxPlayer can be enabled as follows:
System Libraries and NSH Add-Ons -> NxPlayer media player / command line ->
CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500 : Size of the audio player stack
@ -2801,7 +2816,7 @@ Audio Support
CONFIG_NXPLAYER_INCLUDE_HELP=y : Includes a help command
CONFIG_NXPLAYER_INCLUDE_DEVICE_SEARCH=n : (Since there is only one audio device)
CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE=y : Only one audio device is supported
CONFIG_NXPLAYER_FMT_FROM_EXT=n : (Since only PCM is supported)
CONFIG_NXPLAYER_FMT_FROM_EXT=y : (Since only PCM is supported)
NXPLAYER_FMT_FROM_HEADER=n : (Since only PCM is supported)
CONFIG_NXPLAYER_INCLUDE_MEDIADIR=y : Specify a media directory
CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sdcard" : See below
@ -3883,39 +3898,7 @@ Configurations
- Obviously, the nx and touchscreen built in applications cannot
be supported.
3. NSH Console Access.
This configuration boots directly into a graphic, window manage
environment. There is no serial console. Some initial stdout
information will go to the USART3 serial output, but otherwise
the serial port will be silent.
Access to the NSH console is available in two ways:
a. The NxWM provides a graphics-based terminals (called NxConsoles);
The console command line is still available within NxConsole
windows once NxWM is up and running. The console input is still
via stdin (the host terminal window), but console output will go
to the NxConsole terminal.
NOTES:
i) Later I plan to integrate a USB keyboard so that the
console input will come from a keyboard attached to the
SAMA5D4-EK.
ii) It would also not be a difficult task to add a serial console
as part of the NxWM console. That is an option if a serial
console is really necessary but is not currently planned.
b. Telnet NSH sessions are still supported and this is, in general,
the convenient way to access the shell (and RAMLOG).
As with the NSH configuration, debug output will still go to the
circular RAMLOG buffer but cannot be accessed from a serial console.
Instead, you will need use the dmesg command from an NxConsole or
from a Telnet session to see the debug output
4. Here is the quick summary of the build steps. These steps assume
3. Here is the quick summary of the build steps. These steps assume
that you have the entire NuttX GIT in some directory ~/nuttx-git.
You may have these components installed elsewhere. In that case, you
will need to adjust all of the paths in the following accordingly:
@ -3963,14 +3946,71 @@ Configurations
$ cd ~/nuttx-git/nuttx
$ make
5. The NxWM example was designed tiny displays. On this larger 800x480
display, the icons are too tiny to be usable. I have created a
larger 320x320 logo for the opening screen and added image scaling
to expand the images in the taskbar. The expanded images are not
great. The same problems exist in the application toolbar and in the
start window. These icons are not yet scaled.
4. NSH Console Access.
I plan to correct these images in the very near future.
This configuration boots directly into a graphic, window manage
environment. There is no serial console. Some initial stdout
information will go to the USART3 serial output, but otherwise
the serial port will be silent.
Access to the NSH console is available in two ways:
a. The NxWM provides a graphics-based terminals (called NxConsoles);
The console command line is still available within NxConsole
windows once NxWM is up and running. The console input is still
via stdin (the host terminal window), but console output will go
to the NxConsole terminal.
NOTES:
i) Later I plan to integrate a USB keyboard so that the
console input will come from a keyboard attached to the
SAMA5D4-EK.
ii) It would also not be a difficult task to add a serial console
as part of the NxWM console. That is an option if a serial
console is really necessary but is not currently planned.
b. Telnet NSH sessions are still supported and this is, in general,
the convenient way to access the shell (and RAMLOG).
As with the NSH configuration, debug output will still go to the
circular RAMLOG buffer but cannot be accessed from a serial console.
Instead, you will need use the dmesg command from an NxConsole or
from a Telnet session to see the debug output
5. Media Player
This configuration has the media player application enabled. That
player is still a work in progress and is only partially integrated
with the NxPlay as of this writing.
At present, the the WM8904 driver is not included in the
configuration. Instead the "NULL" audio device in built in to
support higher level testing (there are also some unresolved I2C
communication issues the the current WM8904 driver).
This configuration depends on media files in the default mountpoint
at /mnt/sdard. If you see the message "Media volume not mounted"
in the media player text box, then you will need to mount the media
volume:
a. You will need an (full size) SD card containing the .WAV files
that you want to play (.WAV is only format supported as of this
writing). That SD card should be inserted in the HSMCI0 media
slot A (best done before powering up).
b. Then from NSH prompt, you need to mount the media volume like:
nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard
c. Then if you close the old media player window and bring up a
new one, you should see the .WAV files on the SD card in the lis
box.
Currently the list box is not scollable. So you will be limited to
the number .WAV files that will fit in the existing list box (a
scrollable list box class exists, but has not been integrated into
the media play demo).
STATUS:
See the To-Do list below

View File

@ -540,11 +540,19 @@ CONFIG_RTC_DATETIME=y
# CONFIG_WATCHDOG is not set
# CONFIG_TIMER is not set
# CONFIG_ANALOG is not set
# CONFIG_AUDIO_DEVICES is not set
CONFIG_AUDIO_DEVICES=y
# 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_VIDEO_DEVICES is not set
# CONFIG_BCH is not set
CONFIG_INPUT=y
# CONFIG_MOUSE is not set
# CONFIG_INPUT_MAX11802 is not set
# CONFIG_INPUT_TSC2007 is not set
# CONFIG_INPUT_ADS7843E is not set
CONFIG_INPUT_MXT=y
@ -928,7 +936,33 @@ CONFIG_MM_REGIONS=1
#
# Audio Support
#
# CONFIG_AUDIO is not set
CONFIG_AUDIO=y
# CONFIG_AUDIO_MULTI_SESSION is not set
# CONFIG_AUDIO_LARGE_BUFFERS is not set
CONFIG_AUDIO_NUM_BUFFERS=4
CONFIG_AUDIO_BUFFER_NUMBYTES=8192
# CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS is not set
#
# Supported Audio Formats
#
# CONFIG_AUDIO_FORMAT_AC3 is not set
# CONFIG_AUDIO_FORMAT_DTS is not set
CONFIG_AUDIO_FORMAT_PCM=y
# CONFIG_AUDIO_FORMAT_MP3 is not set
# CONFIG_AUDIO_FORMAT_MIDI is not set
# CONFIG_AUDIO_FORMAT_WMA is not set
# CONFIG_AUDIO_FORMAT_OGG_VORBIS is not set
#
# Exclude Specific Audio Features
#
# CONFIG_AUDIO_EXCLUDE_VOLUME is not set
# CONFIG_AUDIO_EXCLUDE_BALANCE is not set
# CONFIG_AUDIO_EXCLUDE_TONE is not set
# CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME is not set
# CONFIG_AUDIO_EXCLUDE_STOP is not set
# CONFIG_AUDIO_CUSTOM_DEV_PATH is not set
#
# Binary Formats
@ -1408,14 +1442,35 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=6
# NxWM Media Player Display Settings
#
CONFIG_NXWM_MEDIAPLAYER=y
#
# Media File Configuration
#
CONFIG_NXWM_MEDIAPLAYER_MEDIAPATH="/mnt/sdcard"
# CONFIG_NXWM_MEDIAPLAYER_NOFILTER is not set
CONFIG_NXWM_MEDIAPLAYER_FILTER=y
# CONFIG_NXWM_MEDIAPLAYER_FILTER_AC3 is not set
# CONFIG_NXWM_MEDIAPLAYER_FILTER_DTS is not set
CONFIG_NXWM_MEDIAPLAYER_FILTER_WAV=y
# CONFIG_NXWM_MEDIAPLAYER_FILTER_MP3 is not set
# CONFIG_NXWM_MEDIAPLAYER_FILTER_MIDI is not set
# CONFIG_NXWM_MEDIAPLAYER_FILTER_WMA is not set
# CONFIG_NXWM_MEDIAPLAYER_FILTER_OGGVORBIS is not set
#
# General Look and Feel
#
CONFIG_NXWM_MEDIAPLAYER_XSPACING=12
CONFIG_NXWM_MEDIAPLAYER_YSPACING=16
CONFIG_NXWM_MEDIAPLAYER_VOLUMESTEP=5
CONFIG_NXWM_MEDIAPLAYER_MINVOLUMEHEIGHT=6
# CONFIG_NXWM_MEDIAPLAYER_CUSTOM_COLORS is not set
# CONFIG_NXWM_MEDIAPLAYER_BORDERS is not set
#
# Volume Control Configuration
#
CONFIG_NXWM_MEDIAPLAYER_VOLUMESTEP=5
CONFIG_NXWM_MEDIAPLAYER_MINVOLUMEHEIGHT=6
#
# Platform-specific Support
#
@ -1468,7 +1523,17 @@ CONFIG_I2CTOOL_DEFFREQ=100000
#
# NxPlayer media player library / command Line
#
# CONFIG_SYSTEM_NXPLAYER is not set
CONFIG_SYSTEM_NXPLAYER=y
CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500
# CONFIG_NXPLAYER_COMMAND_LINE is not set
# CONFIG_NXPLAYER_INCLUDE_DEVICE_SEARCH is not set
CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE=y
CONFIG_NXPLAYER_FMT_FROM_EXT=y
# CONFIG_NXPLAYER_FMT_FROM_HEADER is not set
CONFIG_NXPLAYER_INCLUDE_MEDIADIR=y
CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sdcard"
CONFIG_NXPLAYER_RECURSIVE_MEDIA_SEARCH=y
# CONFIG_NXPLAYER_INCLUDE_SYSTEM_RESET is not set
#
# RAM test