24 Jul
2007
24 Jul
'07
1:43 a.m.
On Mon, 23 Jul 2007, Takashi Iwai wrote:
At Sat, 21 Jul 2007 17:10:08 -0700 (PDT), Thanks, the patch looks almost fine, but please fix the following minor issues:
- Try to avoid a magic number, e.g. >> 9.
Ok, I added a bunch of the fields from the WM8768 datasheet that could be useful.
- put callback should return 0 for non-changed value, a positive (usually 1) when the value is changed, and a negative error code for errors.
It will now return 0 if the value wasn't changed and also not do the unnecessary spi write.
- Try to keep lines within 80 chars (to follow the standard coding style). I know that other codes there are not, but don't care now. We'll fix them later, too.
Also done. The loops that add the controls have long lines that didn't wrap well. So I made a second patch that converts the loop I added plus the two existing loops into a macro, which IMHO looks a lot nicer and reduces code duplication.
I also upped the version numbers and used snd_ctl_boolean_mono_info.