From: Gergo Koteles <soyer@irl.hu>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
Baojun Xu <baojun.xu@ti.com>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] ASoc: tas2563: DSP Firmware loading support
Date: Tue, 05 Dec 2023 02:11:01 +0100 [thread overview]
Message-ID: <ba7ed44fdcfe0a3a80024f0ecdfa4e5255cc48c6.camel@irl.hu> (raw)
In-Reply-To: <7a919eef-d9b4-4bcb-bc19-9a6868d1cc54@linux.intel.com>
Hi Pierre-Louis,
Thank you for your review.
On Mon, 2023-12-04 at 18:05 -0600, Pierre-Louis Bossart wrote:
> >
> > sound/soc/codecs/tas2562.c | 2 +-
>
> are tas2562 and tas2563 (from commit subject) the same?
>
No, tas2563 is register compatible with tas2562.
> >
> > +#include <linux/slab.h>
> > +#include <linux/delay.h>
>
> nit-pick: alphabetical order?
>
Good idea, I'll fix it and the others in the next version.
> > +
> > +#include <sound/tas2562.h>
> > +#include <sound/tas25xx-dsp.h>
> > +
> > +
> > +static void tas25xx_process_fw_delay(struct tas25xx_cmd *cmd)
> > +{
> > + mdelay(cpu_to_be16(cmd->hdr.length));
>
> is this the length of the header, or the duration of the delay?
>
> Someone will get it wrong with this naming...
>
I think this is because of the format.
If cmd_type is TAS25XX_CMD_DELAY, then hdr.length is the length of the
delay.
At least I think so, based on
https://lore.kernel.org/lkml/6d6aaed3-dac8-e1ec-436c-9b04273df2b3@ti.com/T/
https://github.com/torvalds/linux/blob/bee0e7762ad2c6025b9f5245c040fcc36ef2bde8/sound/soc/codecs/tas2781-fmwlib.c#L769
But I don't see any TAS25XX_CMD_DELAY command in the firmware I'm
using.
> >
> > + prog_num = cpu_to_be32(fw_data->hdr->num_programs);
> > + config_num = cpu_to_be32(fw_data->hdr->num_configs);
> > + dev_info(dev, "Firmware loaded: programs %d, configs %d\n",
> > + prog_num, config_num);
> > +
For me:
release_firmware(fw) is missing from here
> > + return fw_data;
> > +
> > +err_prog:
> > + devm_kfree(dev, fw_data->prog_data);
> > +err_hdr:
> > + devm_kfree(dev, fw_data->hdr);
> > +err_data:
> > + devm_kfree(dev, fw_data);
> > +err_fw:
> > + release_firmware(fw);
> > +
> > + return NULL;
> > +}
> >
Regards,
Gergo
next prev parent reply other threads:[~2023-12-05 1:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 23:45 [PATCH 0/2] ALSA: hda/tas2563: Add tas253 HDA driver Gergo Koteles
2023-12-04 23:45 ` [PATCH 1/2] ASoc: tas2563: DSP Firmware loading support Gergo Koteles
2023-12-05 0:05 ` Pierre-Louis Bossart
2023-12-05 1:11 ` Gergo Koteles [this message]
2023-12-04 23:45 ` [PATCH 2/2] ALSA: hda/tas2563: Add tas2563 HDA driver Gergo Koteles
2023-12-05 0:22 ` Pierre-Louis Bossart
2023-12-05 1:31 ` Gergo Koteles
2023-12-05 16:01 ` Pierre-Louis Bossart
2023-12-05 16:12 ` Pierre-Louis Bossart
2023-12-05 16:13 ` Mark Brown
2023-12-05 16:59 ` Gergo Koteles
2023-12-05 17:22 ` Pierre-Louis Bossart
2023-12-06 16:07 ` Amadeusz Sławiński
2023-12-07 13:00 ` Andy Shevchenko
2023-12-10 2:02 ` kernel test robot
2023-12-07 1:05 ` [PATCH 0/2] ALSA: hda/tas2563: Add tas253 " Gergo Koteles
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=ba7ed44fdcfe0a3a80024f0ecdfa4e5255cc48c6.camel@irl.hu \
--to=soyer@irl.hu \
--cc=alsa-devel@alsa-project.org \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=shenghao-ding@ti.com \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®