All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Cc: broonie@kernel.org, lgirdwood@gmail.com,
	pierre-louis.bossart@linux.dev, yung-chuan.liao@linux.intel.com,
	peter.ujfalusi@linux.intel.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH v2 1/3] ASoC: SDCA: Create DAPM widgets and routes from DisCo
Date: Fri, 28 Mar 2025 09:28:06 +0000	[thread overview]
Message-ID: <Z+ZrptkW8HlcYiLB@opensource.cirrus.com> (raw)
In-Reply-To: <d38cc4f0-2018-46ee-93ff-d5dd76ad142b@linux.intel.com>

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

  reply	other threads:[~2025-03-28  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 13:00 [PATCH v2 0/3] Add DAPM/ASoC helpers to create SDCA drivers Charles Keepax
2025-03-27 13:00 ` [PATCH v2 1/3] ASoC: SDCA: Create DAPM widgets and routes from DisCo Charles Keepax
2025-03-27 13:23   ` Amadeusz Sławiński
2025-03-28  9:28     ` Charles Keepax [this message]
2025-03-27 13:00 ` [PATCH v2 2/3] ASoC: SDCA: Create ALSA controls " Charles Keepax
2025-03-27 13:00 ` [PATCH v2 3/3] ASoC: SDCA: Create DAI drivers " Charles Keepax

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=Z+ZrptkW8HlcYiLB@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --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 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.