Re: [Alsa-user] RME HDSPe MADI under ARM issue with playback

2017-06-05 Thread Axel Holzinger
Anders Genell wrote:
> I am sure others have more clever solutions to offer, but you might try 
> invoking the mmap emulation plugin by putting something like
> pcm.mmap0 {
> type mmap_emul;
> slave {
>   pcm "hw:0,0";
> }
> }
>
> pcm.!default {
>   type plug;
>   slave {
> pcm mmap0;
>   }
> }
>
> in you /etc/asound.conf file.
> It will likely add some latency, which is unfortunate when using a pro level 
> card like the HDSPe MADI, but you might at least get sound out of it...
>
> Regards,
> Anders

Hi Anders,

thank you for your reply.

Very strange: With the /etc/asound.conf file with the content you proposed, the 
RME card is not anymore available, even lspci doesn't list it anymore. So I 
tend to think that something with the PCI(e) configuration space is not (yet) 
working/configured correctly.

What's also interesting is that the onboard (on chip) sound device is only 
working with your suggestion. Without it's not playing.

Cheers
Axel


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] RME HDSPe MADI under ARM issue with playback

2017-06-05 Thread Axel Holzinger
Axel Holzinger wrote:
> Hi,
> 
> I'm trying to get a RME HDSPe MADI card to run in an ARM box with Linux
> 4.1.6. I configured the (vendor specific TI) kernel to support the card
(via
> hdspm) compiled into the kernel (not as loadable module).
> 
> The MADI card is detected as a PCI device and the ALSA driver is loaded.
> Unfortunately playout does NOT work: aplay is reporting an error:
> ALSA lib pcm_mmap.c:374:(snd_pcm_mmap) mmap failed: No such device or
> address
> 
> Does anybody have an idea what might be the reason?
> 
> I tested the card on Linux x64 and it worked flawlessly.
> 
> Below is info about the system, aplay output and an strace of the relevant
> part.
> 
> Thanks in advance
> Axel

A friend of mine pointed me to this document:
https://kernel.readthedocs.io/en/sphinx-samples/writing-an-alsa-driver.html#
external-hardware-buffers

and especially this paragraph:
"Another case is when the chip uses a PCI memory-map region for the 
buffer instead of the host memory. In this case, mmap is available only 
on certain architectures like the Intel one. In non-mmap mode, the data 
cannot be transferred as in the normal way. Thus you need to define the 
copy and silence callbacks as well, as in the cases above."

To me it looks like the hdspm driver assumes that mmap mode is available (as
i.e. on an Intel platform) while in reality (here on ARM) it's not.

Shouldn't the driver test is mmap mode is available (could even be done at
compile time) and either not compile (or second best, not load at runtime)
or use a different technique to do what it wants to do?

Cheers
Axel



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] RME HDSPe MADI under ARM issue with playback

2017-06-05 Thread Axel Holzinger
Hi,

I'm trying to get a RME HDSPe MADI card to run in an ARM box with Linux
4.1.6. I configured the (vendor specific TI) kernel to support the card (via
hdspm) compiled into the kernel (not as loadable module).

The MADI card is detected as a PCI device and the ALSA driver is loaded.
Unfortunately playout does NOT work: aplay is reporting an error:
ALSA lib pcm_mmap.c:374:(snd_pcm_mmap) mmap failed: No such device or
address

Does anybody have an idea what might be the reason?

I tested the card on Linux x64 and it worked flawlessly.

Below is info about the system, aplay output and an strace of the relevant
part.

Thanks in advance
Axel

Debian GNU/Linux 8 arm ttyS0
Linux arm 4.1.6-01295-g170507a #1 SMP PREEMPT Fri Jun 2 14:09:10 CEST 2017
armv7l

debian@arm:~$ lscpu
Architecture:  armv7l
Byte Order:Little Endian
CPU(s):2
On-line CPU(s) list:   0,1
Thread(s) per core:1
Core(s) per socket:2
Socket(s): 1
Model name:ARMv7 Processor rev 2 (v7l)
CPU max MHz:   1500.
CPU min MHz:   1000.

debian@arm:~/Music$ lspci
00:00.0 PCI bridge: Texas Instruments Device  (rev 01)
01:00.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP
MADI (rev d2)

debian@arm:~/Music$ aplay --list-devices
 List of PLAYBACK Hardware Devices 
card 0: HDSPMx5c7496 [RME MADI_5c7496], device 0: RME MADI [RME MADI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: H5804encode [HDMI 5804.encoder], device 0: HDMI
5804.encoder snd-soc-dummy-dai-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

debian@arm:~/Music$ aplay --list-pcms
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=HDSPMx5c7496
RME MADI_5c7496, RME MADI
Default Audio Device
sysdefault:CARD=HDSPMx5c7496
RME MADI_5c7496, RME MADI
Default Audio Device
dmix:CARD=HDSPMx5c7496,DEV=0
RME MADI_5c7496, RME MADI
Direct sample mixing device
dsnoop:CARD=HDSPMx5c7496,DEV=0
RME MADI_5c7496, RME MADI
Direct sample snooping device
hw:CARD=HDSPMx5c7496,DEV=0
RME MADI_5c7496, RME MADI
Direct hardware device without any conversions
plughw:CARD=HDSPMx5c7496,DEV=0
RME MADI_5c7496, RME MADI
Hardware device with all software conversions
default:CARD=H5804encode
HDMI 5804.encoder,
Default Audio Device
sysdefault:CARD=H5804encode
HDMI 5804.encoder,
Default Audio Device
dmix:CARD=H5804encode,DEV=0
HDMI 5804.encoder,
Direct sample mixing device
dsnoop:CARD=H5804encode,DEV=0
HDMI 5804.encoder,
Direct sample snooping device
hw:CARD=H5804encode,DEV=0
HDMI 5804.encoder,
Direct hardware device without any conversions
plughw:CARD=H5804encode,DEV=0
HDMI 5804.encoder,
Hardware device with all software conversions

debian@arm:~$ aplay --version
aplay: version 1.0.28 by Jaroslav Kysela 

debian@arm:~$ aplay -vv audio.wav
Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz,
Stereo
ALSA lib pcm_mmap.c:374:(snd_pcm_mmap) mmap failed: No such device or
address
aplay: set_params:1297: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (46439 46440)
PERIOD_SIZE: 2048
PERIOD_BYTES: 8192
PERIODS: 2
BUFFER_TIME: (92879 92880)
BUFFER_SIZE: 4096
BUFFER_BYTES: 16384
TICK_TIME: 0

strace:
open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK|O_CLOEXEC) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
ioctl(4, AGPIOC_ACQUIRE or APM_IOC_STANDBY or SNDRV_PCM_IOCTL_INFO,
0xbecdfb64) = 0
fcntl64(4, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
ioctl(4, AGPIOC_INFO or SNDRV_PCM_IOCTL_PVERSION, 0xbecdfacc) = 0
ioctl(4, AGPIOC_SETUP or SNDRV_PCM_IOCTL_TTSTAMP, 0xbecdfad4) = 0
mmap2(NULL, 4096, PROT_READ, MAP_SHARED, 4, 0x8000) = -1 ENXIO (No such
device or address)



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user