alsa/0003-USB-Audio-Add-second-S-PDIF-device-on-Phiree-U2.patch
Ismail Dönmez 5da7a20162 Accepting request 241986 from home:tiwai:branches:multimedia:libs
- Remove superfluous Loopback.conf from the source, as it was
  already included in 1.0.28 tarball
- Backport upstream fixes: UCM dummy PCM definition, ICE1712 surround
  definitions, USB-audio secondary PCM definition, PCM rate plugin
  boundary overwrap fix, MONOTONIC_RAW timestamp support, PCM route
  plugin 3-byte format fixes, etc:
  0001-ucm-Document-PlaybackPCMIsDummy-and-CapturePCMIsDumm.patch
  0002-ICE1712-add-surround71-pcm-definition.patch
  0003-USB-Audio-Add-second-S-PDIF-device-on-Phiree-U2.patch
  0004-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
  0005-pcm-Provide-a-CLOCK_MONOTONIC_RAW-timestamp-type.patch
  0006-Add-timestamp-type-to-sw_params-internal-only.patch
  0007-pcm-Add-sw_params-API-functions-to-get-set-timestamp.patch
  0008-pcm-Implement-timestamp-type-setup-in-hw-plugin.patch
  0009-pcm-Implement-timestamp-type-handling-in-all-plugins.patch
  0010-test-audio_time-Set-timestamp-type-explicitly.patch
  0011-pcm-route-Use-get-put-labels-for-all-3-byte-formats.patch
  0012-pcm-Fill-sw_params-proto-field.patch
  0013-pcm-route-Use-get32-for-multi-source-route-calculati.patch
  0014-pcm-Drop-snd_pcm_linear_-get-put-32_index.patch

OBS-URL: https://build.opensuse.org/request/show/241986
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=162
2014-07-24 11:12:46 +00:00

85 lines
2.3 KiB
Diff

From ea865bba4615d906144ae5d4f72a4aad2baffe1f Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Tue, 8 Jul 2014 11:19:20 +0300
Subject: [PATCH 03/14] USB-Audio: Add second S/PDIF device on Phiree U2
Phiree U2 has an unusual configuration. It only has S/PDIF output, but
there are still two devices presented:
- device 0: PCM audio, subject to volume control
- device 1: non-PCM data (passthrough), not subject to volume control
It looks like the AES bits are set according to the selected device,
since outputting PCM data via device 1 will not work (silence).
Currently only the device 0 is shown via the "iec958" alias, and the
second device is not accessible via hinted aliases.
Simply provide access to both of these devices via the "iec958" alias.
Reported-by: touc @ XBMC forum
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/cards/USB-Audio.conf | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
index ce3ae019f7f6..77a48b9f5562 100644
--- a/src/conf/cards/USB-Audio.conf
+++ b/src/conf/cards/USB-Audio.conf
@@ -52,6 +52,11 @@ USB-Audio.pcm.iec958_device {
"USB Device 0x46d:0x992" 999
}
+# Second iec958 device number, if any.
+USB-Audio.pcm.iec958_2_device {
+ "PHIREE U2" 1 # 0 = PCM S/PDIF, 1 = non-PCM S/PDIF
+}
+
# If a device requires non-standard definitions for front, surround40,
# surround51, surround71 or iec958, they can be defined here.
@@ -422,4 +427,39 @@ USB-Audio.pcm.iec958.0 {
}
}
+USB-Audio.pcm.iec958.1 {
+ @args [ CARD AES0 AES1 AES2 AES3 ]
+ @args.CARD { type string }
+ @args.AES0 { type integer }
+ @args.AES1 { type integer }
+ @args.AES2 { type integer }
+ @args.AES3 { type integer }
+ @func refer
+ name {
+ @func concat
+ strings [
+ "cards.USB-Audio."
+ { @func card_name card $CARD }
+ ".pcm.iec958_2:CARD=" $CARD
+ ",AES0=" $AES0 ",AES1=" $AES1 ",AES2=" $AES2 ",AES3=" $AES3
+ ]
+ }
+ default {
+ # FIXME: we cannot set the AES parameters
+ type hw
+ card $CARD
+ device {
+ @func refer
+ name {
+ @func concat
+ strings [
+ "cards.USB-Audio.pcm.iec958_2_device."
+ { @func card_name card $CARD }
+ ]
+ }
+ default 999
+ }
+ }
+}
+
# vim: ft=alsaconf
--
2.0.1