Hello Mr. Brown,
I have a soundcard which doesnt have a linux driver. Quick information it has a pcm1863 adc and a pcm5142 dac on it.
I began with the sample dt-overlay and edited it to get the playback working. No problem at all using the pcm512x.c codec driver.
After that I began with the development of the codec driver, i2c driver and a dt-overlay with 2 sound links as I need the record and playback functionality.
Right now the i2c driver seems to work since I get the hardware into the used state "UU" when executing the i2cdetect command and dmesg says "mapping okay". My codec driver has the codec driver and dai definitions and some more functions (here I am stuck). I know that I need the hw_params and some set functions to have the minimal functionality.
1. Question would be towards the dapm_widgets and dapm_routes definitions. When defining the dapm_adc widget do I put there the Capture stream or do I seperate it with "NULL" and then adding the dapm_routes definitions? Which one is correct since I have seen both possibilities (which ad-/disadventages do I have?)
2. Question in my layout plan I need to set the ADC to VIN4 l/r because only this one is connected to the microphone port. I have put it into the sound controls but how would I make this switch from the command line (arecord) or in the players (like vlc)
3. It seems that I have a bug in the code since I cant execute arecord right now it says file doesnt exist.
Furthermore I would really be interested in gaining more knowledge about the accesses and routines from e.g. the vlc player using alsa (?) and then the accesses to the hardware? Also the whole registering process in which order are which files executed to get into the state where the os knows my soundcard. Since in a stracktrace I dont see this high level functions executed. I have found some diagramms on a chinese blog which look not bad but it would be a lot better to find it out myself with the os if possible. Here is an example of this kind of diagramm: http://img.blog.csdn.net/20160127104235066?watermark/2/text/aHR0cDovL2Jsb2cu...
This is knowledge is right now optional but would be very helpful for the understanding.
I will attach the codec driver, codec driver-header, i2c driver, dt-overlay and a strack trace (ltrace just hangs up) so it would be possible to find out what is causing the problem right now. Please note that this is my first driver development and the code is work in progress :)
Thanks a lot for Your time and Your help! If an information is missing please ask for it and if possible I will try to provide it :)
Sanj3k