[alsa-devel] [PATCH v3] ASoC: Add support for cs42l73 codec

Tabi Timur-B04825 B04825 at freescale.com
Fri Oct 7 04:13:32 CEST 2011


On Thu, Oct 6, 2011 at 11:19 AM, Brian Austin <brian.austin at cirrus.com> wrote:

> +static const u8 cs42l73_reg[] = {
> +/*0*/ 0x00, 0x42, 0xA7, 0x30,
> +/*4*/ 0x00, 0x00, 0xF1, 0xDF,
> +/*8*/ 0x3F, 0x57, 0x53, 0x00,
> +/*C*/ 0x00, 0x15, 0x00, 0x15,
> +/*A*/ 0x00, 0x15, 0x00, 0x06,
> +/*E*/ 0x00, 0x00, 0x00, 0x00,
> +/*18*/ 0x00, 0x00, 0x00, 0x00,
> +/*1C*/ 0x00, 0x00, 0x00, 0x00,
> +/*20*/ 0x00, 0x00, 0x00, 0x00,
> +/*24*/ 0x00, 0x00, 0x00, 0x7F,
> +/*28*/ 0x00, 0x00, 0x3F, 0x00,
> +/*2C*/ 0x00, 0x3F, 0x00, 0x00,
> +/*30*/ 0x3F, 0x00, 0x00, 0x00,
> +/*34*/ 0x18, 0x3F, 0x3F, 0x3F,
> +/*38*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*3C*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*40*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*44*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*48*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*4C*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*50*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*54*/ 0x3F, 0xAA, 0x3F, 0x3F,
> +/*58*/ 0x3F, 0x3F, 0x3F, 0x3F,
> +/*5C*/ 0x3F, 0x3F, 0x00, 0x00,
> +/*60*/ 0x00, 0x00
> +};

The comments should go on the right side, not the left.


> +static struct cs42l73_mclkx_div cs42l73_mclkx_coeffs[] = {
> +       {5644800,  1, 0},       /* 5644800 */
> +       {6000000,  1, 0},       /* 6000000 */
> +       {6144000,  1, 0},       /* 6144000 */
> +       {11289600, 2, 2},       /* 5644800 */
> +       {12288000, 2, 2},       /* 6144000 */
> +       {12000000, 2, 2},       /* 6000000 */
> +       {13000000, 2, 2},       /* 6500000 */
> +       {19200000, 3, 3},       /* 6400000 */
> +       {24000000, 4, 4},       /* 6000000 */
> +       {26000000, 4, 4},       /* 6500000 */
> +       {38400000, 6, 5}        /* 6400000 */

What do these comments mean?

In fact, I think there should be more comments in this file overall.
For example, almost none of the functions are commented.

> +/* I2C Registers */
> +/* I2C Address: 1001010[R/W] - 10010100 = 0x94(Write); 10010101 = 0x95(Read) */

This chip has separate I2C addresses for reading and writing?

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Alsa-devel mailing list