Dne 18. 04. 21 v 16:27 Takashi Sakamoto napsal(a):
As you note, control component is not optional for card. However, control component is actually maintained as device component. As current card implementation maintains each component successfully, it's worth to investigate putting control-related members from card to unique structure behind private data of component. Additionally, when integrating control functionality, it's convenient to me that relevant stuffs are capsulated apart from card structure. In short, I'd like 'divide and conquer' method in code refactoring.
I guess, you may show us some code for comments (just a prototype - no full implementation). As you noted, the separate allocations may save some space depending on the slab implementation, but it should not be the main reason for such changes.
The device objects were added to the ALSA control stack later (they simply didn't exist when we designed it). Also, the low-level drivers communicate with the control layer using the card structure pointer. The additional translation is another challenge.
Jaroslav