[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z+ZrptkW8HlcYiLB@opensource.cirrus.com>
Date: Fri, 28 Mar 2025 09:28:06 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Amadeusz Sławiński <amadeuszx.slawinski@...ux.intel.com>
Cc: broonie@...nel.org, lgirdwood@...il.com, pierre-louis.bossart@...ux.dev,
yung-chuan.liao@...ux.intel.com, peter.ujfalusi@...ux.intel.com,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...nsource.cirrus.com
Subject: Re: [PATCH v2 1/3] ASoC: SDCA: Create DAPM widgets and routes from
DisCo
On Thu, Mar 27, 2025 at 02:23:28PM +0100, Amadeusz Sławiński wrote:
> On 3/27/2025 2:00 PM, Charles Keepax wrote:
> > + texts[0] = "No Jack";
> > + texts[1] = "Jack Unknown";
> > + texts[2] = "Detection in Progress";
> > + values[0] = 0;
> > + values[1] = 1;
> > + values[2] = 2;
> > + for (i = 0; i < range->rows; i++) {
> > + enum sdca_terminal_type type;
> > +
> > + type = sdca_range(range, SDCA_SELECTED_MODE_TERM_TYPE, i);
> > +
> > + values[i + 3] = sdca_range(range, SDCA_SELECTED_MODE_INDEX, i);
> > + texts[i + 3] = get_terminal_name(type);
> > + if (!texts[i + 3]) {
> > + dev_err(dev, "%s: Unrecognised terminal type: %#x\n",
> > + entity->label, type);
> > + return -EINVAL;
> > + }
> > + }
> > +
> > + soc_enum->reg = SDW_SDCA_CTL(function->desc->adr, entity->id, control->sel, 0);
> > + soc_enum->items = range->rows + 3;
> > + soc_enum->mask = roundup_pow_of_two(soc_enum->items) - 1;
> > + soc_enum->texts = texts;
>
> soc_enum->values = values; seems to be missing?
Thank you that is an excellent spot, the device I am using
the values line up with the index so was easy to miss.
Thanks,
Charles
Powered by blists - more mailing lists