OSDN Git Service

Add initial support for Realtek ALC1220 TRX40 motherboards
authorMaxim Levitsky <mlevitsk@redhat.com>
Sun, 3 May 2020 19:31:12 +0000 (22:31 +0300)
committerJaroslav Kysela <perex@perex.cz>
Mon, 11 May 2020 17:03:30 +0000 (19:03 +0200)
Tested with TRX40 Designare but should work on most TRX40 motherboards
Tested with pulseaudio 36a4923f9bd05d4c5e2e8b1765f18edf452b9251
 with fix for 8 channel mixer element applied

Tested with kernel 5.7.0-rc3

The following are the notes of the testing and implementation

* Back speaker works in 5.1 mode, becasue side channel
  shares jack with line-in and by default line-in is configured.
  Once jack retasking will work, it will work automatically
  Same for front mic that can be retasked to line-in

* SPDIF is not tested physically yet. The SPDIF mute mixer control is recognised by
  pulseaudio correctly so profile is correct.

* When all capture inputs are disconnected, pulseaudio thinks that the UCM2 profile
  is invalid and doesn't use it by default. It can be forced to use it by selecting
  it in the pavucontrol. Or you can for now comment out one of 'JackControl' statements,
  to make it think that one of the jacks is always plugged in.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf [new file with mode: 0644]
ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop.conf [new file with mode: 0644]

diff --git a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf
new file mode 100644 (file)
index 0000000..344db83
--- /dev/null
@@ -0,0 +1,60 @@
+SectionDevice."Speaker" {
+       Comment "Speakers"
+       Value {
+              PlaybackChannels 8
+              PlaybackPriority 100
+              PlaybackPCM "hw:${CardId}"
+              JackControl "Speaker Jack"
+              PlaybackMixerElem "Speaker"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Front Headphones"
+       Value {
+               PlaybackPriority 300
+               PlaybackPCM "hw:${CardId},1"
+               JackControl "Front Headphone Jack"
+               PlaybackMixerElem "Front Headphone"
+       }
+}
+
+SectionDevice."SPDIF" {
+       Comment "S/PDIF Out"
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},2"
+               PlaybackMixerElem "IEC958"
+       }
+}
+
+SectionDevice."Line" {
+       Comment "Line In"
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               JackControl "Line Jack"
+               CaptureMixerElem "Line"
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Microphone"
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},1"
+               JackControl "Mic Jack"
+               CaptureMixerElem "Mic"
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "Front Microphone"
+       Value {
+               CapturePriority 300
+               CapturePCM "hw:${CardId},2"
+               JackControl "Front Mic Jack"
+               CaptureMixerElem "Front Mic"
+       }
+}
+
diff --git a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop.conf b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop.conf
new file mode 100644 (file)
index 0000000..da257e7
--- /dev/null
@@ -0,0 +1,6 @@
+Syntax 2
+Comment "USB-audio on Realtek ALC1220-VB desktop"
+SectionUseCase."HiFi" {
+       File "Realtek-ALC1220-VB-Desktop-HiFi.conf"
+       Comment "Default Alsa Profile"
+}