[alsa-devel] [FFADO-devel] [RFC][PATCH 37/37] ALSA: firewire-motu: add hwdep interface

Jonathan Woithe jwoithe at just42.net
Mon Jul 13 12:58:50 CEST 2015


On Sat, Jul 11, 2015 at 11:12:48PM +0900, Takashi Sakamoto wrote:
> This commit adds hwdep interface so as the other firewire sound devices
> has.
> :

> +static int hwdep_get_info(struct snd_motu *motu, void __user *arg)
> +{
> +	struct fw_device *dev = fw_parent_device(motu->unit);
> +	struct snd_firewire_get_info info;
> +
> +	memset(&info, 0, sizeof(info));
> +	info.type = SNDRV_FIREWIRE_TYPE_FIREWORKS;

A SNDRV_FIREWIRE_TYPE_MOTU type identifier was defined, so should it not be
used here?

> +int snd_motu_create_hwdep_device(struct snd_motu *motu)
> +{
> +	struct snd_hwdep *hwdep;
> +	int err;
> +
> +	err = snd_hwdep_new(motu->card, "MOTU", 0, &hwdep);
> +	if (err < 0)
> +		goto end;
> +	strcpy(hwdep->name, "MOTU");
> +	hwdep->iface = SNDRV_HWDEP_IFACE_FW_FIREWORKS;

Similarly, SNDRV_HWDEP_IFACE_FW_MOTU is defined and it would seem to me that
it should be used here instead of SNDRV_HWDEP_IFACE_FW_FIREWORKS.  Am I
missing something?

Regards
  jonathan


More information about the Alsa-devel mailing list