All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH v2] add native DSD support for XMOS based DACs
Date: Fri, 05 Sep 2014 16:27:39 +0200	[thread overview]
Message-ID: <s5hd2bab0ro.wl-tiwai@suse.de> (raw)
In-Reply-To: <1409925519.2732.1.camel@xs4all.nl>

At Fri, 05 Sep 2014 15:58:39 +0200,
Jurgen Kramer wrote:
> 
> On Fri, 2014-09-05 at 15:36 +0200, Takashi Iwai wrote:
> > At Fri,  5 Sep 2014 14:24:57 +0200,
> > Jurgen Kramer wrote:
> > > 
> > > Add quirks for XMOS based DACs for native DSD playback support using the new
> > > DSD_U32_LE sample format.
> > > 
> > > This version adds native DSD support for:
> > > - iFi Audio micro iDSD/nano iDSD (they use the same prod. id)
> > > - DIYINHK USB to I2S/DSD converter
> > > 
> > > Changes from v1:
> > > - use specific product id and alt setting per XMOS based device
> > > 
> > > Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
> > > ---
> > >  sound/usb/quirks.c | 15 +++++++++++++++
> > >  1 file changed, 15 insertions(+)
> > > 
> > > diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
> > > index 19a921e..5ae0536 100644
> > > --- a/sound/usb/quirks.c
> > > +++ b/sound/usb/quirks.c
> > > @@ -1174,5 +1174,20 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
> > >  		}
> > >  	}
> > >  
> > > +	/* XMOS based USB DACs */
> > > +	if (le16_to_cpu(chip->dev->descriptor.idVendor) == 0x20b1) {
> > > +		switch (le16_to_cpu(chip->dev->descriptor.idProduct)) {
> > > +		/* iFi Audio micro/nano iDSD */
> > > +		case 0x3008:
> > > +			if (fp->altsetting == 2)
> > > +				return SNDRV_PCM_FMTBIT_DSD_U32_LE;
> > 
> > Missing break?
> It is already returning. Where would the break go?

What if fp->altsetting == 3 with 20b1:3008 chip?
Then it falls down to below, and return SNDRV_PCM_FMTBIT_DSD_U32_LE.
Is this expected?

> > 
> > > +		/* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
> > > +		case 0x2009:
> > > +			if (fp->altsetting == 3)
> > > +				return SNDRV_PCM_FMTBIT_DSD_U32_LE;
> > 
> > Ditto.
> See above.

If the fallthrough is intentional, you *must* put a comment it's
really a fallthrough.


Takashi

> > 
> > > +		default:
> > > +			return 0;
> > > +		}
> > > +	}
> > >  	return 0;
> > >  }
> > > -- 
> Jurgen
> 

  reply	other threads:[~2014-09-05 14:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 12:24 [PATCH v2] add native DSD support for XMOS based DACs Jurgen Kramer
2014-09-05 13:36 ` Takashi Iwai
2014-09-05 13:58   ` Jurgen Kramer
2014-09-05 14:27     ` Takashi Iwai [this message]
2014-09-05 14:37       ` Jurgen Kramer
2014-09-05 14:51         ` Takashi Iwai
2014-09-05 15:03           ` Jurgen Kramer
2014-09-05 15:26 ` Clemens Ladisch
2014-09-05 15:41   ` Jurgen Kramer

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=s5hd2bab0ro.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=gtmkramer@xs4all.nl \
    /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.