From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Nariman <narimantos@gmail.com>,
linux-kernel@vger.kernel.org
Cc: liam.r.girdwood@linux.intel.com, alsa-devel@alsa-project.org,
broonie@kernel.org, yang.jie@linux.intel.com, tiwai@suse.com
Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: bytcr_5640.c:Refactored if statement and removed buffer
Date: Mon, 6 May 2019 10:50:25 -0500 [thread overview]
Message-ID: <d9cb3ce3-d97b-a8ce-252f-c7d8455f5ae1@linux.intel.com> (raw)
In-Reply-To: <6b7111b1-2387-5366-3536-f369a9b0982a@redhat.com>
On 5/6/19 10:43 AM, Hans de Goede wrote:
> Hi Pierre-Louis,
>
> Nariman and the author authors of these patches are a group of students
> doing
> some kernel work for me and this is a warm-up assignment for them to get
> used
> to the kernel development process.
>
> On 06-05-19 17:21, Pierre-Louis Bossart wrote:
>>
>>> static int byt_rt5640_suspend(struct snd_soc_card *card)
>>> @@ -1268,28 +1266,12 @@ static int snd_byt_rt5640_mc_probe(struct
>>> platform_device *pdev)
>>> log_quirks(&pdev->dev);
>>> if ((byt_rt5640_quirk & BYT_RT5640_SSP2_AIF2) ||
>>> - (byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2)) {
>>> -
>>> - /* fixup codec aif name */
>>> - snprintf(byt_rt5640_codec_aif_name,
>>> - sizeof(byt_rt5640_codec_aif_name),
>>> - "%s", "rt5640-aif2");
>>> -
>>> - byt_rt5640_dais[dai_index].codec_dai_name =
>>> - byt_rt5640_codec_aif_name;
>>> - }
>>> + (byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2))
>>> + byt_rt5640_dais[dai_index].codec_dai_name = "rt5640-aif2";
>>
>> This is not equivalent, you don't deal with the (byt_rt5640_quirk &
>> BYT_RT5640_SSP2_AIF2) case. The default is SSP_AIF1
>
> I might be mistaken here, but look closer, the original:
> if ((byt_rt5640_quirk & BYT_RT5640_SSP2_AIF2) ||
>
> Line is kept, so the new code block is:
>
> if ((byt_rt5640_quirk & BYT_RT5640_SSP2_AIF2) ||
> (byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2))
> byt_rt5640_dais[dai_index].codec_dai_name = "rt5640-aif2";
>
> Which does take the BYT_RT5640_SSP2_AIF2 into account.
Ah yes, my mistake. Looks good then.
>
>>> if ((byt_rt5640_quirk & BYT_RT5640_SSP0_AIF1) ||
>>> - (byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2)) {
>>> -
>>> - /* fixup cpu dai name name */
>>> - snprintf(byt_rt5640_cpu_dai_name,
>>> - sizeof(byt_rt5640_cpu_dai_name),
>>> - "%s", "ssp0-port");
>>> -
>>> - byt_rt5640_dais[dai_index].cpu_dai_name =
>>> - byt_rt5640_cpu_dai_name;
>>> - }
>>> + (byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2))
>>> + byt_rt5640_dais[dai_index].cpu_dai_name = "ssp0-port";
>>
>> Same here, this is not equivalent. the SSP0_AIF1 case is not handled.
>> it's fine to remove the intermediate buffers, but you can't remove
>> support for 2 out of the 4 combinations supported.
>
> Same remark here from me too :)
>
> Regards,
>
> Hans
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-05-06 15:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 15:16 [PATCH] ASoC: Intel: bytcr_5640.c:Refactored if statement and removed buffer Nariman
2019-05-04 15:16 ` [PATCH] ASoC: Intel: cht_bsw_rt5645.c: Remove buffer and snprintf calls Nariman
2019-05-06 15:24 ` [alsa-devel] " Pierre-Louis Bossart
2019-05-06 15:48 ` Hans de Goede
2019-05-04 15:16 ` [PATCH] ASoC: Intel: bytcr_5640.c: refactored codec_fixup Nariman
2019-05-04 15:16 ` [PATCH] ASoC: Intel: bytcr_rt5651.c: remove string buffers 'byt_rt5651_cpu_dai_name' and 'byt_rt5651_cpu_dai_name' Nariman
2019-05-05 7:51 ` Takashi Iwai
2019-05-05 7:51 ` Takashi Iwai
2019-05-06 15:40 ` Hans de Goede
2019-05-06 15:50 ` Pierre-Louis Bossart
2019-05-06 15:24 ` Pierre-Louis Bossart
2019-05-06 15:21 ` [alsa-devel] [PATCH] ASoC: Intel: bytcr_5640.c:Refactored if statement and removed buffer Pierre-Louis Bossart
2019-05-06 15:43 ` Hans de Goede
2019-05-06 15:50 ` Pierre-Louis Bossart [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-05-19 17:57 nariman
2019-05-20 8:37 ` Hans de Goede
2019-05-20 13:50 ` [alsa-devel] " Pierre-Louis Bossart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9cb3ce3-d97b-a8ce-252f-c7d8455f5ae1@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=narimantos@gmail.com \
--cc=tiwai@suse.com \
--cc=yang.jie@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.