Re: [PATCH 1/2] ASoC: simple-card: Introduce playback-only/capture only DAI link flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel

Thank you for your patch.
This is not a big deal, but...

> We need this to signal that DAI link supports only 1 direction that
> can only be either playback or capture.
(snip)
> +	if (of_property_read_bool(node, "playback-only"))
> +		is_playback_only = true;
> +
> +	if (of_property_read_bool(node, "capture-only"))
> +		is_capture_only = true;

More simply

	is_playback_only = of_property_read_bool(node, "playback-only");
	is_capture_only  = of_property_read_bool(node, "capture-only");

> +	ret = asoc_simple_parse_link_direction(dev, node, prefix,
> +					       &is_playback_only,
> +					       &is_capture_only);
> +	if (ret < 0)
> +		return 0;
> +
> +	dai_link->playback_only = is_playback_only;
> +	dai_link->capture_only = is_capture_only;

It doesn't overwrite when error case, so
More simply

	ret = asoc_simple_parse_link_direction(dev, node, prefix,
						&dai_link->playback_only,
						&dai_link->capture_only);


Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux