Re: [PATCH] ASoC: fsl_ssi: fix AC'97 mode

From: Maciej S. Szmigiero
Date: Sat Jun 27 2015 - 19:24:54 EST


Hello Fabio,

W dniu 28.06.2015 01:06, Fabio Estevam pisze:
> Hi Maciej,
>
> On Sat, Jun 27, 2015 at 7:51 PM, Maciej S. Szmigiero
> <mail@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> Currently the AC'97 mode in fsl_ssi driver isn't functional.
>
> Thanks for the fix. I look forward to test it on my udoo board.

Thanks.

>> This patch implements the following changes to make it work
>> properly:
>> * IPG clock have to be enabled during AC'97 CODEC
>> register access,
>> * AC'97 DAI driver struct need the same probe method as
>> I2S one to setup DMA params,
>> * AC'97 bus can support asymmetric playback/capture rates,
>> * Check whether setting AC'97 ops succeeded and
>> clean them on removal so the driver can be reloaded,
>> * AC'97 CODEC will be instantiated in AC'97 mode,
>> * Set DAI format function small fixes in AC'97 mode.
>
> It seems like a lot of changes in a single patch.
>
> Care to split it into smaller pieces?

OK, I will resend this split into individual patches.

>> +
>> + ret = clk_prepare_enable(fsl_ac97_data->clk);
>> + if (ret) {
>> + pr_err("ac97 read clk_prepare_enable failed: %d\n",
>> + ret);
>> + return -1;

> 'return ret' would be better here.

This function normal return value is an AC'97 register value,
so isn't more appropriate to return 0xffff in case of error
than linux error code?

> Thanks

Best regards,
Maciej Szmigiero

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/