alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
To: mengdong.lin@linux.intel.com
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	mengdong.lin@intel.com, vinod.koul@intel.com, broonie@kernel.org
Subject: Re: [RFC PATCH 2/3] ucm: Parse sequence of component devices
Date: Tue, 15 Nov 2016 08:45:51 +0000	[thread overview]
Message-ID: <1479199551.7823.11.camel@loki> (raw)
In-Reply-To: <9baaf7a3d55a86e417826715e8e63d1a76582156.1479195801.git.mengdong.lin@linux.intel.com>

On Tue, 2016-11-15 at 16:02 +0800, mengdong.lin@linux.intel.com wrote:
> From: Mengdong Lin <mengdong.lin@linux.intel.com>
> 
> A machine device's verb file (e.g.HiFi) can include configuration files
> of component devices via alsaconf syntax <searchdir:xxx> and <file_name>.
> Then the machine device's sequence can enable or disable a component
> device by keyword 'enadev' and 'disdev' followed the name of the component
> device.
> 
> UCM sequence parser will find the component device and mark if its enable
> or disable sequence is needed by the parent, the machine device.
> 
> New element type and struct are defined for the sequence of a component
> device. Component devices will be removed from the machine device list
> 'device_list' of a verb, since we don't want to expose them to audio
> servers with original API to list devices for backward compatibility.
> A new list 'cmpt_device_list' is used for the component devices of a verb.
> 
> Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
> 



> @@ -306,6 +381,30 @@ static int parse_sequence(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED,
>  			continue;
>  		}
>  
> +		if (strcmp(cmd, "enadev") == 0) {
> +			/* need to enable a component device */
> +			curr->type = SEQUENCE_ELEMENT_TYPE_CMPT_SEQ;
> +			err = parse_component_seq(uc_mgr, n, 1,
> +						&curr->data.cmpt_seq);
> +			if (err < 0) {
> +				uc_error("error: enadev requires a valid device!");
> +				return err;
> +			}
> +			continue;
> +		}
> +
> +		if (strcmp(cmd, "disdev") == 0) {

Do we need to document enadev and disdev anywhere ?

Liam

  reply	other threads:[~2016-11-15  8:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15  7:57 [RFC PATCH 0/3] Add support for component devices mengdong.lin
2016-11-15  8:02 ` [RFC PATCH 1/3] ucm: Skip component directories when scanning sound card configuration files mengdong.lin
2016-11-15  8:45   ` Liam Girdwood
2016-11-16  7:07     ` Lin, Mengdong
2016-11-15  8:02 ` [RFC PATCH 2/3] ucm: Parse sequence of component devices mengdong.lin
2016-11-15  8:45   ` Liam Girdwood [this message]
2016-11-16  7:16     ` Lin, Mengdong
2016-11-15  8:02 ` [RFC PATCH 3/3] ucm: Execute " mengdong.lin
2016-11-15  8:49   ` Liam Girdwood
2016-11-16  7:36     ` Lin, Mengdong
2016-11-15  8:55 ` [RESEND RFC PATCH 0/3] ucm: Add support for " Liam Girdwood

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=1479199551.7823.11.camel@loki \
    --to=liam.r.girdwood@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=mengdong.lin@intel.com \
    --cc=mengdong.lin@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@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;
as well as URLs for NNTP newsgroup(s).