Re: Get triggered when the device opens

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> And how does that manufacturer tell you to use it?

Get the clock started and configure. The loss of the WS signal is not intended and is a failure. A xrun results in configuration loss.


> Anyway, it might be possible to write an external filter plugin:
> https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_external_plugins.html

I am doing that right now. Right now. It compiles but does not start:

$ cat ~/.asoundrc 
pcm_hw_internal {
   type hw
   card 0
   device 0
}
pcm.myplugin {
   type myplugin
   slave {
      pcm pcm_hw_internal
   }
}

$ arecord -D myplugin /dev/zero
ALSA lib dlmisc.c:142:(snd_dlsym_verify) unable to verify version for symbol _snd_pcm_myplugin_open
ALSA lib dlmisc.c:263:(snd1_dlobj_cache_get) symbol _snd_pcm_myplugin_open is not defined inside /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_myplugin.so
arecord: main:722: audio open error: No such device or address

This looks like a compile problem, but I don't what exactly. It is compiled like this:
$ gcc -I/usr/include/alsa -Wall -g -lasound -fPIC -DPIC -shared -o build/libasound_module_pcm_myplugin.so alsa-plugin.c

FYI: I am just testing this on my local machine (ubuntu 16.04) with pulseaudio killed (and autospawn=no).

> Does the kernel driver start the I²S clocks in hw_params() or in trigger()?

I cannot tell because I am not versed enough in device/ALSA/SOC drivers but I made a step by step device initialization via alsa-lib and the clock really starts only the device is written or read. The SOC manufacturer supplies the ALSA device drivers that utilizes the I2S/PCM interface to talk to the audio controller which I need to configure.

Regards,
Thomas Frank

------------------------------------------------------------------------------
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@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux