[alsa-devel] [PATCH v2] ASoC: dapm - Add API call to query the widgets of valid DAPM paths.

Liam Girdwood lrg at ti.com
Thu Jul 21 21:52:22 CEST 2011


On 20/07/11 21:15, Mark Brown wrote:
> On Wed, Jul 20, 2011 at 12:23:15PM +0100, Liam Girdwood wrote:
> 
>> +                       dev_dbg(widget->dapm->dev," %c : %s -> %s -> %s\n",
>> +                               path->sink && path->connect ? '*' : ' ',
>> +                               widget->name, path->name, path->sink->name);
> 
> We should fix the debugfs stuff to include unconnected paths too, only
> showing currently active paths was a mistake. 

This will show the unconnected paths but not weak paths.
I can update to include a flag for weak though.

 Might be worth dialing
> down to vdbg too, we look at DAPM a *lot* during scenario changes and
> on big systems it can obscure what's going on.

Ok, that would make sense. I can think of a few other areas for dev_vdbg too... 

> 
>> +/**
>> + * snd_soc_dapm_get_connected_widgets - query audio path and it's widgets.
>> + * @dapm: the dapm context.
>> + * @stream_name: stream name.
>> + * @list: list of active widgets for this stream.
>> + * @stream: stream direction.
>> + *
>> + * Queries DAPM graph as to whether an valid audio stream path exists for
>> + * the initial widget specified by name. This takes into account
> 
> s/initial widget/stream/
> 
>> +	/* get stream root widget AIF from stream string and direction */
>> +	list_for_each_entry(w, &dapm->card->widgets, list) {
>> +
>> +		if (w->id != type)
>> +			continue;
>> +
>> +		if (strstr(w->sname, stream_name))
>> +			goto found;
>> +	}
>> +	dev_err(dapm->dev, "root widget for %s not found\n", stream_name);
> 
> Hrm, this will only check the widgets connected to the first widget it
> sees for an AIF.  For streams with multiple widgets connected (eg, left
> and right channel) it's only going to see things on the first widget it
> comes across which probably isn't what we were expecting.  Unless we
> change to match the comment and query by widget name in which case we're
> already requiring uniqueness.

Yes, but I cant think of any single channel AIFs atm, unless Wolfson has some ?

Liam



More information about the Alsa-devel mailing list