Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Xu, Baojun" <baojun.xu@ti.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "tiwai@suse.de" <tiwai@suse.de>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"pierre-louis.bossart@linux.intel.com"
	<pierre-louis.bossart@linux.intel.com>,
	"Lu, Kevin" <kevin-lu@ti.com>,
	"Ding, Shenghao" <shenghao-ding@ti.com>,
	"Navada Kanyana, Mukund" <navada@ti.com>,
	"13916275206@139.com" <13916275206@139.com>,
	"Hampiholi, Vallabha" <v-hampiholi@ti.com>,
	"P O, Vijeth" <v-po@ti.com>,
	"Holalu Yogendra, Niranjan" <niranjan.hy@ti.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"liam.r.girdwood@intel.com" <liam.r.girdwood@intel.com>,
	"yung-chuan.liao@linux.intel.com"
	<yung-chuan.liao@linux.intel.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"soyer@irl.hu" <soyer@irl.hu>
Subject: Re: [EXTERNAL] Re: [PATCH v9] ALSA: hda/tas2781: Add tas2781 hda SPI driver
Date: Fri, 12 Jul 2024 04:00:21 +0000	[thread overview]
Message-ID: <8f1389fd3d8a4e26953643e10ab7a33d@ti.com> (raw)
In-Reply-To: <CAMuHMdUw+KEGuAOWApfiLJF6b1M8pkoX+u+Q2dEVMqjV0_K34g@mail.gmail.com>

Hi Geert,

Thanks for your review, answer in line.

Best Regards
Jim
________________________________________
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: 12 July 2024 05:05
> To: Xu, Baojun
> Cc: tiwai@suse.de; robh+dt@kernel.org; andriy.shevchenko@linux.intel.com; lgirdwood@gmail.com; perex@perex.cz; pierre-louis.bossart@linux.intel.com; Lu, Kevin; Ding, Shenghao; Navada Kanyana, Mukund; 13916275206@139.com; Hampiholi, Vallabha; P O, Vijeth; Holalu Yogendra, Niranjan; alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; liam.r.girdwood@intel.com; yung-chuan.liao@linux.intel.com; broonie@kernel.org; soyer@irl.hu
> Subject: [EXTERNAL] Re: [PATCH v9] ALSA: hda/tas2781: Add tas2781 hda SPI driver
> 
> Hi Baojun, On Thu, Jul 11, 2024 at 3: 22 PM Baojun Xu <baojun. xu@ ti. com> wrote: > This patch was used to add TAS2781 devices on SPI support in sound/pci/hda. > It use ACPI node descript about parameters of TAS2781 on SPI, it like: 
> ZjQcmQRYFpfptBannerStart
> This message was sent from outside of Texas Instruments.
> Do not click links or open attachments unless you recognize the source of this email and know the content is safe. If you wish to report this message to IT Security, please forward the message as an attachment to phishing@list.ti.com
> 
> ZjQcmQRYFpfptBannerEnd
> 
> Hi Baojun,
> 
> On Thu, Jul 11, 2024 at 3:22 PM Baojun Xu <baojun.xu@ti.com> wrote:
> > This patch was used to add TAS2781 devices on SPI support in sound/pci/hda.
> > It use ACPI node descript about parameters of TAS2781 on SPI, it like:
> >     Scope (_SB.PC00.SPI0)
> >     {
> >         Device (GSPK)
> >         {
> >             Name (_HID, "TXNW2781")  // _HID: Hardware ID
> >             Method (_CRS, 0, NotSerialized)
> >             {
> >                 Name (RBUF, ResourceTemplate ()
> >                 {
> >                     SpiSerialBusV2 (...)
> >                     SpiSerialBusV2 (...)
> >                 }
> >             }
> >         }
> >     }
> >
> > And in platform/x86/serial-multi-instantiate.c, those spi devices will be
> > added into system as a single SPI device, so TAS2781 SPI driver will
> > probe twice for every single SPI device. And driver will also parser
> > mono DSP firmware binary and RCA binary for itself.
> > The code support Realtek as the primary codec.
> >
> > Signed-off-by: Baojun Xu <baojun.xu@ti.com>
> > --- /dev/null
> > +++ b/sound/pci/hda/tas2781_hda_spi.c
> 
> Thanks for your patch!
> 
> > +/* fixed m68k compiling issue: mapping table can save code field */
> > +static const struct blktyp_devidx_map ppc3_tas2781_mapping_table[] = {
> 
> > +/* fixed m68k compiling issue: mapping table can save code field */
> > +static unsigned char map_dev_idx(struct tasdevice_fw *tas_fmw,
> > +       struct tasdev_blk *block)
> 
> > +/* Block parser function. */
> > +static int fw_parse_block_data_kernel(struct tasdevice_fw *tas_fmw,
> > +       struct tasdev_blk *block, const struct firmware *fmw, int offset)
> > +{
> 
> > +       /*
> > +        * Fixed m68k compiling issue:
> > +        * 1. mapping table can save code field.
> > +        * 2. storing the dev_idx as a member of block can reduce unnecessary
> > +        *    time and system resource comsumption of dev_idx mapping every
> > +        *    time the block data writing to the dsp.
> > +        */
> 
> Do we really need more copies of this?
> See sound/soc/codecs/tas2781-fmwlib.c.
> 

Yes, it's parser is similar, but for SPI device, will parser single device
firmware binary file for own only, and for I2C, parser support multi devices
firmware binary file, if use same lib functions, need add many code for check.

> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> 
> 

      reply	other threads:[~2024-07-17  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17  9:34 [PATCH v9] ALSA: hda/tas2781: Add tas2781 hda SPI driver baojun.xu
2024-07-11 21:05 ` Geert Uytterhoeven
2024-07-12  4:00   ` Xu, Baojun [this message]

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=8f1389fd3d8a4e26953643e10ab7a33d@ti.com \
    --to=baojun.xu@ti.com \
    --cc=13916275206@139.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=kevin-lu@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=navada@ti.com \
    --cc=niranjan.hy@ti.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=shenghao-ding@ti.com \
    --cc=soyer@irl.hu \
    --cc=tiwai@suse.de \
    --cc=v-hampiholi@ti.com \
    --cc=v-po@ti.com \
    --cc=yung-chuan.liao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox