[alsa-devel] [PATCH] ASoC: fsl_ssi: fix AC'97 mode

Maciej S. Szmigiero mail at maciej.szmigiero.name
Sun Jun 28 01:24:27 CEST 2015


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 at maciej.szmigiero.name> 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



More information about the Alsa-devel mailing list