Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange mixer matrix behavior using Scarlett 18i8 2nd gen #21

Open
jump65 opened this issue Jan 3, 2021 · 11 comments
Open

Strange mixer matrix behavior using Scarlett 18i8 2nd gen #21

jump65 opened this issue Jan 3, 2021 · 11 comments

Comments

@jump65
Copy link

jump65 commented Jan 3, 2021

Hi all!
In these days I did some test of the mixer with my Scarlett 18i8 2nd gen on Ubuntu 20.04 LTS (notebook Samsung NP370R5E, Kernel Linux 5.4.0-58-lowlatency x86_64); the scarlett internal mixer control capability is very powerful, and let me effectively use an old laptop to track my band (when the pandemic will let us to play together again, at least...) using Ardour.

But I found a strange behavior in the mixer control matrix: let r for row and c for column, controls seems to be linked <r,c> and <r+10, c-1>. So when I move knob at <1,2> the knob at <11,1> moves too... the 'link' doesn't depend on source or capture selection.

link

From my test, scarlett internal mixer seems to respond coherently to what is shown in the GUI, so the input-output mapping is predictable; for example, if I select the same source for two linked knob, then that source gets 6 more dB. But full independent control for more than 10 sources is not possible...

double-level

Tried to dig a bit in the sources to find some clue but I'm not sure to understand how structs parameters affect the controls...

Seems that someone else here is using 18i8... have you ever experienced same issue? Is it a known problem (I apologize if so...)?

Thanks
Greetings form Italy

Giampietro

PS: There is some minor cosmetics issue too (knob bottom left is Headphone 2R...)

@x42
Copy link
Owner

x42 commented Jan 3, 2021

try scarlett-mixer --print-controls and perhaps also --preset-only

perhaps there's a similar issue like for the 6i6, where the distance between the matrix controls is reported incorrectly by the kernel driver:

.matrix_mix_offset = 26, .matrix_mix_stride = 9, // XXX stride should be 7, bug in kernel-driver ?!
.matrix_in_offset = 25, .matrix_in_stride = 9, // XXX stride should be 7, bug in kernel-driver ?!

@jump65
Copy link
Author

jump65 commented Jan 6, 2021

Hi
scarlett-mixer --preset-only fails to run:

giampi@casa:~/scarlett-mixer$ ./scarlett-mixer --preset-only
scarlett-mixer: ./src/scarlett_mixer.c:737: get_enum: Assertion `snd_mixer_selem_is_enumerated (c->elem)' failed.
Annullato (core dump creato)

the other command returns what follows:
giampi@casa:~/scarlett-mixer$ ./scarlett-mixer --print-controls
Device `Scarlett 18i8 USB' has 237 contols:
0 'PCM 01', ENUM
1 'PCM 02', ENUM
2 'PCM 03', ENUM
3 'PCM 04', ENUM
4 'PCM 05', ENUM
5 'PCM 06', ENUM
6 'PCM 07', ENUM
7 'PCM 08', ENUM
8 'PCM 09', ENUM
9 'PCM 10', ENUM
10 'PCM 11', ENUM
11 'PCM 12', ENUM
12 'PCM 13', ENUM
13 'PCM 14', ENUM
14 'PCM 15', ENUM
15 'PCM 16', ENUM
16 'PCM 17', ENUM
17 'PCM 18', ENUM
18 'Line 01 (Monitor L)'
19 'Line 02 (Monitor R)'
20 'Line 03 (Headphones 1 L)'
21 'Line 04 (Headphones 1 R)'
22 'Line 05 (Headphones 2 L)'
23 'Line 06 (Headphones 2 R)'
24 'Line In 1 Level', ENUM
25 'Line In 1 Pad', CPS
26 'Line In 2 Level', ENUM
27 'Line In 2 Pad', CPS
28 'Line In 3 Pad', CPS
29 'Line In 4 Pad', CPS
30 'Mix A Input 01'
31 'Mix A Input 02'
32 'Mix A Input 03'
33 'Mix A Input 04'
34 'Mix A Input 05'
35 'Mix A Input 06'
36 'Mix A Input 07'
37 'Mix A Input 08'
38 'Mix A Input 09'
39 'Mix A Input 10'
40 'Mix A Input 11'
41 'Mix A Input 12'
42 'Mix A Input 13'
43 'Mix A Input 14'
44 'Mix A Input 15'
45 'Mix A Input 16'
46 'Mix A Input 17'
47 'Mix A Input 18'
48 'Mix B Input 01'
49 'Mix B Input 02'
50 'Mix B Input 03'
51 'Mix B Input 04'
52 'Mix B Input 05'
53 'Mix B Input 06'
54 'Mix B Input 07'
55 'Mix B Input 08'
56 'Mix B Input 09'
57 'Mix B Input 10'
58 'Mix B Input 11'
59 'Mix B Input 12'
60 'Mix B Input 13'
61 'Mix B Input 14'
62 'Mix B Input 15'
63 'Mix B Input 16'
64 'Mix B Input 17'
65 'Mix B Input 18'
66 'Mix C Input 01'
67 'Mix C Input 02'
68 'Mix C Input 03'
69 'Mix C Input 04'
70 'Mix C Input 05'
71 'Mix C Input 06'
72 'Mix C Input 07'
73 'Mix C Input 08'
74 'Mix C Input 09'
75 'Mix C Input 10'
76 'Mix C Input 11'
77 'Mix C Input 12'
78 'Mix C Input 13'
79 'Mix C Input 14'
80 'Mix C Input 15'
81 'Mix C Input 16'
82 'Mix C Input 17'
83 'Mix C Input 18'
84 'Mix D Input 01'
85 'Mix D Input 02'
86 'Mix D Input 03'
87 'Mix D Input 04'
88 'Mix D Input 05'
89 'Mix D Input 06'
90 'Mix D Input 07'
91 'Mix D Input 08'
92 'Mix D Input 09'
93 'Mix D Input 10'
94 'Mix D Input 11'
95 'Mix D Input 12'
96 'Mix D Input 13'
97 'Mix D Input 14'
98 'Mix D Input 15'
99 'Mix D Input 16'
100 'Mix D Input 17'
101 'Mix D Input 18'
102 'Mix E Input 01'
103 'Mix E Input 02'
104 'Mix E Input 03'
105 'Mix E Input 04'
106 'Mix E Input 05'
107 'Mix E Input 06'
108 'Mix E Input 07'
109 'Mix E Input 08'
110 'Mix E Input 09'
111 'Mix E Input 10'
112 'Mix E Input 11'
113 'Mix E Input 12'
114 'Mix E Input 13'
115 'Mix E Input 14'
116 'Mix E Input 15'
117 'Mix E Input 16'
118 'Mix E Input 17'
119 'Mix E Input 18'
120 'Mix F Input 01'
121 'Mix F Input 02'
122 'Mix F Input 03'
123 'Mix F Input 04'
124 'Mix F Input 05'
125 'Mix F Input 06'
126 'Mix F Input 07'
127 'Mix F Input 08'
128 'Mix F Input 09'
129 'Mix F Input 10'
130 'Mix F Input 11'
131 'Mix F Input 12'
132 'Mix F Input 13'
133 'Mix F Input 14'
134 'Mix F Input 15'
135 'Mix F Input 16'
136 'Mix F Input 17'
137 'Mix F Input 18'
138 'Mix G Input 01'
139 'Mix G Input 02'
140 'Mix G Input 03'
141 'Mix G Input 04'
142 'Mix G Input 05'
143 'Mix G Input 06'
144 'Mix G Input 07'
145 'Mix G Input 08'
146 'Mix G Input 09'
147 'Mix G Input 10'
148 'Mix G Input 11'
149 'Mix G Input 12'
150 'Mix G Input 13'
151 'Mix G Input 14'
152 'Mix G Input 15'
153 'Mix G Input 16'
154 'Mix G Input 17'
155 'Mix G Input 18'
156 'Mix H Input 01'
157 'Mix H Input 02'
158 'Mix H Input 03'
159 'Mix H Input 04'
160 'Mix H Input 05'
161 'Mix H Input 06'
162 'Mix H Input 07'
163 'Mix H Input 08'
164 'Mix H Input 09'
165 'Mix H Input 10'
166 'Mix H Input 11'
167 'Mix H Input 12'
168 'Mix H Input 13'
169 'Mix H Input 14'
170 'Mix H Input 15'
171 'Mix H Input 16'
172 'Mix H Input 17'
173 'Mix H Input 18'
174 'Mix I Input 01'
175 'Mix I Input 02'
176 'Mix I Input 03'
177 'Mix I Input 04'
178 'Mix I Input 05'
179 'Mix I Input 06'
180 'Mix I Input 07'
181 'Mix I Input 08'
182 'Mix I Input 09'
183 'Mix I Input 10'
184 'Mix I Input 11'
185 'Mix I Input 12'
186 'Mix I Input 13'
187 'Mix I Input 14'
188 'Mix I Input 15'
189 'Mix I Input 16'
190 'Mix I Input 17'
191 'Mix I Input 18'
192 'Mix J Input 01'
193 'Mix J Input 02'
194 'Mix J Input 03'
195 'Mix J Input 04'
196 'Mix J Input 05'
197 'Mix J Input 06'
198 'Mix J Input 07'
199 'Mix J Input 08'
200 'Mix J Input 09'
201 'Mix J Input 10'
202 'Mix J Input 11'
203 'Mix J Input 12'
204 'Mix J Input 13'
205 'Mix J Input 14'
206 'Mix J Input 15'
207 'Mix J Input 16'
208 'Mix J Input 17'
209 'Mix J Input 18'
210 'Mixer Input 01', ENUM
211 'Mixer Input 02', ENUM
212 'Mixer Input 03', ENUM
213 'Mixer Input 04', ENUM
214 'Mixer Input 05', ENUM
215 'Mixer Input 06', ENUM
216 'Mixer Input 07', ENUM
217 'Mixer Input 08', ENUM
218 'Mixer Input 09', ENUM
219 'Mixer Input 10', ENUM
220 'Mixer Input 11', ENUM
221 'Mixer Input 12', ENUM
222 'Mixer Input 13', ENUM
223 'Mixer Input 14', ENUM
224 'Mixer Input 15', ENUM
225 'Mixer Input 16', ENUM
226 'Mixer Input 17', ENUM
227 'Mixer Input 18', ENUM
228 'Analogue Output 01', ENUM
229 'Analogue Output 02', ENUM
230 'Analogue Output 03', ENUM
231 'Analogue Output 04', ENUM
232 'Analogue Output 05', ENUM
233 'Analogue Output 06', ENUM
234 'Clock Source Clock Source', ENUM
235 'S/PDIF Output 1', ENUM
236 'S/PDIF Output 2', ENUM

@yatli
Copy link

yatli commented Aug 23, 2021

Hi!

I'm also using 18i8 gen 2.
As a starting point, QasMixer works fine -- perhaps this means the kernel reported values are good?

But looking at them, they're so different:
DeepinScreenshot_select-area_20210824001036

@yatli
Copy link

yatli commented Aug 23, 2021

okay I understand what OPT_DETECT is doing now.
Maybe the names are parsed incorrectly.

@yatli
Copy link

yatli commented Aug 25, 2021

#25

@jump65 could you please help to confirm it's working?

The strange effect we're seeing is because the stride is set to 10 instead of 18, so it overlaps with the neighbor column.

@jump65
Copy link
Author

jump65 commented Sep 19, 2021

Hi yatly, thanks for your reply! My apologies for mine being so late...
I'm not sure where I have to make changes... below it is the parameter definitions for 18I8 in the source: is ".matrix_in_stride" (line 109) the parameter to be changed?

97	{
98		.name = "Scarlett 18i8 USB",
99		.smi = 18, .smo = 8,
100		.sin = 18, .sout = 8,
101		.smst = 4,
102		.samo = 0,
103		.num_hiz = 2,
104		.num_pad = 4,
105		.num_air = 0,
106		.pads_are_switches = false
107		.matrix_mix_column_major = false,
108		.matrix_mix_offset = 40, .matrix_mix_stride = 9, // < Matrix 01 Mix A
109		.matrix_in_offset = 39, .matrix_in_stride = 9,   // Matrix 01 Input, ENUM
110		.input_offset = 20,   // < Input Source 01, ENUM
111		.out_gain_map = { 1 /* Monitor */, 4 /* Headphone 1 */, 7 /* Headphone 2 */, 10 /* SPDIF */, -1, -1 , -1, -1, -1, -1 },
112		.out_gain_labels = { "Monitor", "Headphone 1", "Headphone 2", "SPDIF", "", "", "", "", "", "" },
113		.out_bus_map = { 2, 3, 5, 6, 8, 9, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
114		.hiz_map = { 15, 17 }, // < Input 1 Impedance, ENUM,  Input 2 Impedance, ENUM
115 	        .pad_map = { 16, 18, 19, 20 },
116	},

Furthermore, the printout of the command ./scarlett-mixer -vv --print controls ends with Using autodetected mapping: does this mean that parameters values set by software are changed with those (wrong) read by kernel?

@jump65
Copy link
Author

jump65 commented Sep 19, 2021

#25

@jump65 could you please help to confirm it's working?

The strange effect we're seeing is because the stride is set to 10 instead of 18, so it overlaps with the neighbor column.

I changed both "stride" parameter in the source, no effect.... only different device param report with -vv --print-controls option. Still using autodetected parameters.

@yatli
Copy link

yatli commented Sep 19, 2021

You can build my branch: https://github.com/yatli/scarlett-mixer
Sorry I forgot about the details (what I changed to make it work) :p -- something wrong with stride width detection.

@yatli
Copy link

yatli commented Sep 19, 2021

auto detect = not using these values in the code.

@jump65 jump65 closed this as completed Sep 19, 2021
@jump65
Copy link
Author

jump65 commented Sep 19, 2021

You can build my branch: https://github.com/yatli/scarlett-mixer
Sorry I forgot about the details (what I changed to make it work) :p -- something wrong with stride width detection.

Your code seems to work! I'm going to stress it in the next days. Thanks!

No overlap in the matrix and all pad buttons working (pad 3&4 buttons were dead in the former version).

Good job! ;)

@jump65 jump65 reopened this Sep 19, 2021
@jump65
Copy link
Author

jump65 commented Sep 19, 2021

(previously closed by mistake)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants