Skip to contentSkip to conversation

plughw, access modes

DISCUSSION Nenad Sljivic 2 participants 3 messages Feb 14, 2011

lore
Share & tools
lore
#0 lore raw

Greetings guys,

I am dealing with the device driver for the chip that has his own hardware buffer and the DMA is not available. Therefore, driver doesn't support MMAP access and the data is copied using the copy file operation. My HW natively supports BE format.

However, I would like to be able to play little endian pcm as well.

The problem, occurs when I try to use plughw device in order to play LE pcm file

" aplay: set_params:1022: Unable to install hw params: "

My debugging session proved me that plughw device is trying to access device driver with MMAP_INTERLEAVED mode. Does it mean that this is the only way for plughw to access device driver, and that I am not able to use plugins unless do some heavy modifications of device drivers (implement mmap access). Am I missing something?

Any info on this would be most welcome.

Thanks,

Nenad

#1 lore raw
Quoted 20 lines · Nenad Sljivic

Greetings guys,

I am dealing with the device driver for the chip that has his own hardware buffer and the DMA is not available. Therefore, driver doesn't support MMAP access and the data is copied using the copy file operation. My HW natively supports BE format.

However, I would like to be able to play little endian pcm as well.

The problem, occurs when I try to use plughw device in order to play LE pcm file

" aplay: set_params:1022: Unable to install hw params: "

Quoted 5 lines

My debugging session proved me that plughw device is trying to access device driver with MMAP_INTERLEAVED mode. Does it mean that this is the only way for plughw to access device driver, and that I am not able to use plugins unless do some heavy modifications of device drivers (implement mmap access). Am I missing something?

You may enable mmap_emulation for the hw: plugin - see mmap_emulation in:

http://git.alsa-project.org/?p=alsa-lib.git;a=blob_plain;f=doc/asoundrc.txt;hb=HEAD

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

#2 lore raw

Jaroslav,

Thanks a lot for your prompt reply, but as far as I see, mmap_emulation flag is not supported anymore.
I am using 1.0.19 version of alsa-lib.

1) Should I use mmap_emul plugin instead of it? I haven't been able to find any example or configuration that's using this plugin

2) Additional to that, do I have to set SNDRV_PCM_INFO_MMAP in my device driver, in order for mmap emulation to work?

Sorry for my ignorance, but I am an extreme newbie in this area so any help is greatly appreciated.

Thanks a lot,
Nenad

-----Original Message-----
From: Jaroslav Kysela [mailto:[email protected]]
Sent: 14 February 2011 03:10
To: Nenad Sljivic
Cc: [email protected]
Subject: Re: [alsa-devel] plughw, access modes

Quoted 6 lines · Nenad Sljivic

Greetings guys,

I am dealing with the device driver for the chip that has his own hardware buffer and the DMA is not available. Therefore, driver doesn't support

MMAP

Quoted 1 line

access and the data is copied using the copy file operation. My HW

natively

Quoted 5 lines

supports BE format.

However, I would like to be able to play little endian pcm as well.

The problem, occurs when I try to use plughw device in order to play LE

pcm

Quoted 9 lines

file

" aplay: set_params:1022: Unable to install hw params: "

My debugging session proved me that plughw device is trying to access

device

Quoted 4 lines

driver with MMAP_INTERLEAVED mode. Does it mean that this is the only way for plughw to access device driver, and that I am not able to use plugins unless do some heavy modifications of device drivers (implement mmap access). Am I missing something?

You may enable mmap_emulation for the hw: plugin - see mmap_emulation in:

http://git.alsa-project.org/?p=alsa-lib.git;a=blob_plain;f=doc/asoundrc.txt;
hb=HEAD

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.