[alsa-devel] Need help on MMAP

Christopher Tsui cicciolina at sbcglobal.net
Mon Jun 22 00:54:47 CEST 2009


Hi

I am in the process of add mmap support in my ALSA driver.

So this is what i have done so far

In snd_pcm_hardware structure
.info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP |      SNDRV_PCM_INFO_MMAP_VALID

In snd_pcm_ops structure
.mmap = my_pcm_mmap

So to test my code,  I use
aplay -M -Dhw:0 rock.wav

and this is what I get
ALSA lib pcm_mmap.c:378:(snd_pcm_mmap) mmap failed: Invalid argument
aplay: set_params:1022: Unable to install hw params:
ACCESS:  MMAP_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (27210 27211)
PERIOD_SIZE: 1200
PERIOD_BYTES: 4800
PERIODS: 4
BUFFER_TIME: (108843 108844)
BUFFER_SIZE: 4800
BUFFER_BYTES: 19200
TICK_TIME: 10000

What am I doing wrong??

Thanks in advance


More information about the Alsa-devel mailing list