On Fri, Jun 29, 2012 at 06:05:44PM +0200, Benoît Thébaudeau wrote:
On Fri, Jun 29, 2012 at 05:43:09PM +0200, Takashi Iwai wrote:
That's a valid assumption. Usually get and put callbacks must be paired well.
What is the point of having customizable get/put callbacks if dapm_set_path_status() ignores them and duplicates their core behavior?
Nobody needed to do that yet.
In the aic3x example, the bit-field is actually a mixer volume control, and not only a boolean, so I was planning to post a fix for that. The issue is that the encoding of register values for this volume has holes that should not be duplicated in userspace raw values, so custom get and put callbacks have to be used here that will not be compatible with snd_soc_dapm_get_volsw(), which will be blocking for dapm_set_path_status(). Do you have a simple solution for that?
Clearly the driver is just buggy and should implement get for itself too. As far as reading back the path status is concerned so long as the mapping looks OK as a boolean we're fine, it doesn't matter what the individual volumes are as all the code is interested in is on/off.
In the meantime, please find below a quick patch for the consistency issue.
Stop doing this, send patches for review rather than burying them in the middle of e-mails where they're at best a pain to apply.