From: Clemens Ladisch <clemens@ladisch.de>
To: Chris J Arges <chris.j.arges@canonical.com>,
Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, robin@gareus.org, th55@gmx.de,
david.henningsson@canonical.com
Subject: Re: [PATCH v3 4/4] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20
Date: Mon, 03 Nov 2014 18:31:01 +0100 [thread overview]
Message-ID: <5457BBD5.3050701@ladisch.de> (raw)
In-Reply-To: <5457B751.20605@canonical.com>
Chris J Arges wrote:
> On 10/30/2014 02:43 AM, Takashi Iwai wrote:
>> Chris J Arges wrote:
>>>
>>> +/********************** Enum Strings *************************/
>>> +static const char txtOff[] = "Off",
>>> + txtPcm1[] = "PCM 1", txtPcm2[] = "PCM 2",
>>> + txtPcm3[] = "PCM 3", txtPcm4[] = "PCM 4",
>>> + txtPcm5[] = "PCM 5", txtPcm6[] = "PCM 6",
>>> + txtPcm7[] = "PCM 7", txtPcm8[] = "PCM 8",
>>> + txtPcm9[] = "PCM 9", txtPcm10[] = "PCM 10",
>>> + txtPcm11[] = "PCM 11", txtPcm12[] = "PCM 12",
>>> + txtPcm13[] = "PCM 13", txtPcm14[] = "PCM 14",
>>> + txtPcm15[] = "PCM 15", txtPcm16[] = "PCM 16",
>>> + txtPcm17[] = "PCM 17", txtPcm18[] = "PCM 18",
>>> + txtPcm19[] = "PCM 19", txtPcm20[] = "PCM 20",
>>> + txtAnlg1[] = "Analog 1", txtAnlg2[] = "Analog 2",
>>> + txtAnlg3[] = "Analog 3", txtAnlg4[] = "Analog 4",
>>> + txtAnlg5[] = "Analog 5", txtAnlg6[] = "Analog 6",
>>> + txtAnlg7[] = "Analog 7", txtAnlg8[] = "Analog 8",
>>> + txtSpdif1[] = "SPDIF 1", txtSpdif2[] = "SPDIF 2",
>>> + txtAdat1[] = "ADAT 1", txtAdat2[] = "ADAT 2",
>>> + txtAdat3[] = "ADAT 3", txtAdat4[] = "ADAT 4",
>>> + txtAdat5[] = "ADAT 5", txtAdat6[] = "ADAT 6",
>>> + txtAdat7[] = "ADAT 7", txtAdat8[] = "ADAT 8",
>>> + txtMix1[] = "Mix A", txtMix2[] = "Mix B",
>>> + txtMix3[] = "Mix C", txtMix4[] = "Mix D",
>>> + txtMix5[] = "Mix E", txtMix6[] = "Mix F",
>>> + txtMix7[] = "Mix G", txtMix8[] = "Mix H";
>>
>> This is too ugly. Can we generate strings systematically?
>
> Hi, at some point we need an array of static strings to pass into
> snd_ctl_enum_info
snd_ctl_enum_info() is a helper function to use in the common case when
you have an array of static strings. If you create some strings
dynamically, fill out info manually.
>>> +static const struct usb_mixer_elem_enum_info opt_save = {
>>> + .start = 0,
>>> + .len = 2,
>>> + .names = (const char *[]){
>>> + "---", "Save"
>>> + }
>>> +};
>>
>> This enum item look strange.
>
> This control is activated much like a push button, so normally its in
> the "---" state and if you active it then it triggers the "Save to HW"
> function.
"Save" is not a state.
> Is there a better way to express this control?
A mixer control that allows no access but TLV_COMMAND.
(Such a control will not be shown by 'normal' mixer applications.)
Regards,
Clemens
next prev parent reply other threads:[~2014-11-03 17:31 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 19:46 [PATCH v2] Scarlett mixer interface inclusion Chris J Arges
2014-10-21 19:46 ` [PATCH v2] Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 Chris J Arges
2014-10-22 6:49 ` Takashi Iwai
2014-10-22 18:44 ` Chris J Arges
2014-10-29 20:55 ` [PATCH v3 0/4] Scarlett mixer interface inclusion Chris J Arges
2014-10-29 20:56 ` [PATCH v3 1/4] Revert "ALSA: usb-audio: Add quirk for Focusrite Scarlett Chris J Arges
2014-10-29 20:56 ` [PATCH v3 2/4] ALSA: usb-audio: Add usb_mixer_elem_enum_info Chris J Arges
2014-10-30 7:17 ` Takashi Iwai
2014-10-29 20:56 ` [PATCH v3 3/4] ALSA: usb-audio: make set_*_mix_values functions public Chris J Arges
2014-10-29 20:56 ` [PATCH v3 4/4] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 Chris J Arges
2014-10-30 7:43 ` Takashi Iwai
2014-11-03 17:11 ` Chris J Arges
2014-11-03 17:31 ` Clemens Ladisch [this message]
2014-10-30 7:11 ` [PATCH v3 0/4] Scarlett mixer interface inclusion Takashi Iwai
2014-11-03 22:58 ` [PATCH 0/4 v4] " Chris J Arges
2014-11-03 22:58 ` [PATCH 1/4 v4] Revert "ALSA: usb-audio: Add quirk for Focusrite Scarlett Chris J Arges
2014-11-03 22:58 ` [PATCH 2/4 v4] ALSA: usb-audio: Add private_data pointer to usb_mixer_elem_info Chris J Arges
2014-11-03 22:58 ` [PATCH 3/4 v4] ALSA: usb-audio: make set_*_mix_values functions public Chris J Arges
2014-11-03 22:58 ` [PATCH 4/4 v4] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 Chris J Arges
2014-11-04 10:18 ` Takashi Iwai
2014-11-04 13:16 ` Tobias Hoffmann
2014-11-04 13:29 ` Tobias Hoffmann
2014-11-04 19:45 ` Chris J Arges
2014-11-04 14:00 ` Takashi Iwai
2014-11-04 19:56 ` Chris J Arges
2014-11-04 19:51 ` Chris J Arges
2014-11-05 16:32 ` [PATCH v5] " Chris J Arges
2014-11-06 14:33 ` [PATCH 0/4 v5] Scarlett mixer interface inclusion Chris J Arges
2014-11-06 14:33 ` [PATCH 1/4 v5] Revert "ALSA: usb-audio: Add quirk for Focusrite Scarlett Chris J Arges
2014-11-06 14:33 ` [PATCH 2/4 v5] ALSA: usb-audio: Add private_data pointer to usb_mixer_elem_info Chris J Arges
2014-11-06 14:33 ` [PATCH 3/4 v5] ALSA: usb-audio: make set_*_mix_values functions public Chris J Arges
2014-11-06 14:33 ` [PATCH 4/4 v5] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 Chris J Arges
2014-11-07 10:15 ` Takashi Iwai
2014-11-10 18:59 ` [PATCH 0/4 v6] Scarlett mixer interface inclusion Chris J Arges
2014-11-10 18:59 ` [PATCH 1/4 v6] Revert "ALSA: usb-audio: Add quirk for Focusrite Scarlett Chris J Arges
2014-11-10 18:59 ` [PATCH 2/4 v6] ALSA: usb-audio: Add private_data pointer to usb_mixer_elem_info Chris J Arges
2014-11-10 18:59 ` [PATCH 3/4 v6] ALSA: usb-audio: make set_*_mix_values functions public Chris J Arges
2014-11-10 18:59 ` [PATCH 4/4 v6] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 Chris J Arges
2014-11-10 19:24 ` Takashi Iwai
2014-11-10 22:00 ` Chris J Arges
2014-11-11 7:33 ` Takashi Iwai
2014-11-12 18:06 ` [PATCH 0/4 v7] Scarlett mixer interface inclusion Chris J Arges
2014-11-12 18:06 ` [PATCH 1/4 v7] Revert "ALSA: usb-audio: Add quirk for Focusrite Scarlett Chris J Arges
2014-11-12 18:07 ` [PATCH 2/4 v7] ALSA: usb-audio: Add private_data pointer to usb_mixer_elem_info Chris J Arges
2014-11-12 18:07 ` [PATCH 3/4 v7] ALSA: usb-audio: make set_*_mix_values functions public Chris J Arges
2014-11-12 18:07 ` [PATCH 4/4 v7] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 Chris J Arges
2014-11-13 6:36 ` [PATCH 0/4 v7] Scarlett mixer interface inclusion Takashi Iwai
2014-11-13 6:38 ` David Henningsson
2014-11-13 13:01 ` Chris J Arges
2014-11-04 20:11 ` [PATCH 4/4 v4] ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 David Henningsson
2014-11-04 20:18 ` Chris J Arges
2014-11-05 9:55 ` David Henningsson
2014-11-02 19:00 ` [PATCH v3 0/4] Scarlett mixer interface inclusion Dominik Haumann
2014-11-03 15:49 ` Chris J Arges
2014-11-03 22:31 ` Chris J Arges
2014-10-22 6:36 ` [PATCH v2] " Takashi Iwai
2014-11-05 11:33 ` Takashi Iwai
2014-11-05 12:39 ` Takashi Iwai
2014-11-05 14:20 ` Takashi Iwai
2014-11-05 14:30 ` Chris J Arges
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=5457BBD5.3050701@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=chris.j.arges@canonical.com \
--cc=david.henningsson@canonical.com \
--cc=robin@gareus.org \
--cc=th55@gmx.de \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox