2010/7/29 Adam Rosenberg adam@alcorn.com
I am trying to use plug to play audio files that are S16_LE but my hardware only supports S32_LE. It is not working. Here is an example of the problem using speaker-test. First I use S32_LE and it works as expected. I then try S16_LE but it fails. Does this mean the plug plugin cannot convert between these sample formats?
Thanks, Adam
Please use latest version of speaker-test and alsa-lib.
and post struct snd_pcm_hardware of you driver
I am using the latest release of uClinux for Blackfin BF537 and do not know how to configure and install the latest version of alsa-lib and alsa-utils. I am starting to understand how struct snd_pcm_hardware is used by the ALSA PCM code but you are correct to assume I may have something wrong. Here is the struct:
static struct snd_pcm_hardware ourCS42448PcmHw = { .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER ), .formats = SNDRV_PCM_FMTBIT_S32_LE, .rates = SNDRV_PCM_RATE_48000, .rate_min = 48000, .rate_max = 48000, .buffer_bytes_max = 32768, .channels_min = 1, .channels_max = 2, .period_bytes_max = 32768, .periods_min = 1, .period_bytes_min = 8, .periods_max = 4096, };
Unable to set hw params for playback: Invalid argument Setting of hwparams failed: Invalid argument
This will tell you which argument is invalid
export LIB_LIBASOUND_DEBUG=1 speaker-test -l 1 -r 48000 -c 2 -F S16_LE -Dplughw:0,0,0
If the above still cannot help you find out the problem
you will need to enable RULES_DEBUG in core/pcm_native.c and check the system log to find out how those hw parameters are refined
if you cannot use latest version of speaker-test , read the history of speaker-test
http://git.alsa-project.org/?p=alsa-utils.git;a=history;f=speaker-test/speak...