diff options
author | Daniel Mack <zonque@gmail.com> | 2013-04-17 00:01:38 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-18 10:03:32 +0200 |
commit | d24f5061ee7b9b58a7e97f3c2a72f0a9b115e7e0 (patch) | |
tree | f394f2599adac67b13c31dce99e83c3948f6d452 /sound/usb/card.h | |
parent | 8a2a74d2b7667b2719858caf9eb2b5a92460195d (diff) | |
download | linux-stable-d24f5061ee7b9b58a7e97f3c2a72f0a9b115e7e0.tar.gz linux-stable-d24f5061ee7b9b58a7e97f3c2a72f0a9b115e7e0.tar.bz2 linux-stable-d24f5061ee7b9b58a7e97f3c2a72f0a9b115e7e0.zip |
ALSA: snd-usb: add support for DSD DOP stream transport
In order to provide a compatibility way for pushing DSD
samples through ordinary PCM channels, the "DoP open Standard" was
invented. See http://www.dsd-guide.com for the official document.
The host is required to stuff DSD marker bytes (0x05, 0xfa,
alternating) in the MSB of 24 bit wide samples on the bus, in addition
to the 16 bits of actual DSD sample payload.
To support this, the hardware and software stride logic in the driver
has to be tweaked a bit, as we make the userspace believe we're
operating on 16 bit samples, while we in fact push one more byte per
channel down to the hardware.
The DOP runtime information is stored in struct snd_usb_substream, so
we can keep track of our state across multiple calls to
prepare_playback_urb_dsd_dop().
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r-- | sound/usb/card.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index d32ea411545a..ac55477ce6dd 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h @@ -28,6 +28,7 @@ struct audioformat { unsigned int *rate_table; /* rate table */ unsigned char clock; /* associated clock */ struct snd_pcm_chmap_elem *chmap; /* (optional) channel map */ + bool dsd_dop; /* add DOP headers in case of DSD samples */ }; struct snd_usb_substream; @@ -139,6 +140,12 @@ struct snd_usb_substream { int last_frame_number; /* stored frame number */ int last_delay; /* stored delay */ + + struct { + int marker; + int channel; + int byte_idx; + } dsd_dop; }; struct snd_usb_stream { |