Em Sun, 16 Aug 2015 13:55:43 -0300 Mauro Carvalho Chehab mchehab@osg.samsung.com escreveu:
This is the third draft of the Media Controller Workshop report.
Shuah:
Please review the notes taken from your presentation. They're not looking too nice, IMHO, and, as you didn't prepare any slides, I guess it is very hard for others to understand what's there.
...
Shuah, the part of the report about your ALSA discussions are really hard do understand... I just transcribed them from the Etherpad notes, they need to be fixed for the report:
1.4 Updates to ALSA and au0828 to share resources:
- state->pads[AU8522_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SINK; Need to be MEDIA_PAD_FL_SOURCE;
I can't remember what's this about, and marking a sink as a source doesn't make sense to me. It seems that a lot of context got missed here... Anyone remember why this note was written, and what is it meant to say?
- ALSA: to use on a non-atomic context: pcm->substream->nonatomic IRQ safe start/stop pipeline isn't necessary. Not a good idea to change graph_mutex to spinlock. I2C drivers will break. This will reduce the work and patch series v6 becomes smaller.
- enable_source is necessary at media_device level, but find a better name
- Write helper function to hde decoder and tuner details from ALSA
- remove link is needed - implement - Shuah can do that as part of ALSA work
- Managed Media Controller API - devres - change it to get reference and put reference. It isn't safe to delete media_device device resource. media_device_get() and media_device_put() Keep /dev/media device open and unplug the usb device - kernel would crash
I guess that the above actually means:
2. ALSA currently starts/stops streaming at non-interactive context.That causes troubles with MC because it locks resources using mutexes. One alternative would be to make MC graph traversal calls IRQ safe. Lars suggested, instead, to use ALSA in non-atomic context: Not a good idea to change graph_mutex to spinlock at MC as this will badly impact calls from I2C drivers, causing them to break. Using ALSA in non-atomic is simple: just initialize pcm->substream->nonatomic = 1 IRQ safe start/stop pipeline will not be necessary anymore. This will reduce the work and patch series v6 becomes smaller. 3. An enable_source() function is necessary at media_device level, but find a better name 4. A Write helper function to hide decoder and tuner details from ALSA should be written 5. Support for remove links are needed - Shuah can do that as part of ALSA work, after adding support for it at the core 6. Managed Media Controller API uses devres - change it to get reference and put reference (kref), as it isn't safe to delete media_device device resource. Shuah will create a media_device_get() and media_device_put() set of functions. Currently, keeping /dev/media device opened and unplugging the usb device causes kernel to crash
Regards, Mauro