* [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ
@ 2010-05-29 15:53 Mark Hills
2010-05-29 15:53 ` [PATCH 2/4] snd-usb-caiaq: Simplify single case to an 'if' Mark Hills
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mark Hills @ 2010-05-29 15:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
This feature was undocumented on early A4DJ units. It is indicated
by lighting both the 'line' and 'phono' lamps at the same time.
Newer units document this and the newer Windows drivers enable this
for all units, so restore the functionality.
This patch simplifies the code and changes the mode mapping to match
the A8DJ, favouring simpler code and consistency over keeping the
existing mapping.
Both 'Control vinyl' and 'Phono' input modes enable the hardware
preamp. The difference is the input impedance.
This reverts commit 9a9527e.
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
sound/usb/caiaq/control.c | 30 ++----------------------------
1 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/sound/usb/caiaq/control.c b/sound/usb/caiaq/control.c
index 36ed703..70c3866 100644
--- a/sound/usb/caiaq/control.c
+++ b/sound/usb/caiaq/control.c
@@ -42,21 +42,12 @@ static int control_info(struct snd_kcontrol *kcontrol,
switch (dev->chip.usb_id) {
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ):
- if (pos == 0) {
- /* current input mode of A8DJ */
- uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
- uinfo->value.integer.min = 0;
- uinfo->value.integer.max = 2;
- return 0;
- }
- break;
-
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
if (pos == 0) {
- /* current input mode of A4DJ */
+ /* current input mode of A8DJ and A4DJ */
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->value.integer.min = 0;
- uinfo->value.integer.max = 1;
+ uinfo->value.integer.max = 2;
return 0;
}
break;
@@ -86,14 +77,6 @@ static int control_get(struct snd_kcontrol *kcontrol,
struct snd_usb_caiaqdev *dev = caiaqdev(chip->card);
int pos = kcontrol->private_value;
- if (dev->chip.usb_id ==
- USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ)) {
- /* A4DJ has only one control */
- /* do not expose hardware input mode 0 */
- ucontrol->value.integer.value[0] = dev->control_state[0] - 1;
- return 0;
- }
-
if (pos & CNT_INTVAL)
ucontrol->value.integer.value[0]
= dev->control_state[pos & ~CNT_INTVAL];
@@ -113,15 +96,6 @@ static int control_put(struct snd_kcontrol *kcontrol,
unsigned char cmd = EP1_CMD_WRITE_IO;
switch (dev->chip.usb_id) {
- case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ): {
- /* A4DJ has only one control */
- /* do not expose hardware input mode 0 */
- dev->control_state[0] = ucontrol->value.integer.value[0] + 1;
- snd_usb_caiaq_send_command(dev, EP1_CMD_WRITE_IO,
- dev->control_state, sizeof(dev->control_state));
- return 1;
- }
-
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1):
cmd = EP1_CMD_DIMM_LEDS;
break;
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] snd-usb-caiaq: Simplify single case to an 'if'
2010-05-29 15:53 [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Mark Hills
@ 2010-05-29 15:53 ` Mark Hills
2010-05-29 15:53 ` [PATCH 3/4] Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ" Mark Hills
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mark Hills @ 2010-05-29 15:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
After removing code, only one case remains. So use an 'if' instead.
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
sound/usb/caiaq/control.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/usb/caiaq/control.c b/sound/usb/caiaq/control.c
index 70c3866..91c804c 100644
--- a/sound/usb/caiaq/control.c
+++ b/sound/usb/caiaq/control.c
@@ -95,11 +95,9 @@ static int control_put(struct snd_kcontrol *kcontrol,
int pos = kcontrol->private_value;
unsigned char cmd = EP1_CMD_WRITE_IO;
- switch (dev->chip.usb_id) {
- case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1):
+ if (dev->chip.usb_id ==
+ USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1))
cmd = EP1_CMD_DIMM_LEDS;
- break;
- }
if (pos & CNT_INTVAL) {
dev->control_state[pos & ~CNT_INTVAL]
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ"
2010-05-29 15:53 [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Mark Hills
2010-05-29 15:53 ` [PATCH 2/4] snd-usb-caiaq: Simplify single case to an 'if' Mark Hills
@ 2010-05-29 15:53 ` Mark Hills
2010-05-29 15:53 ` [PATCH 4/4] snd-usb-caiaq: Bump version number to 1.3.21 Mark Hills
2010-05-31 7:20 ` [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Takashi Iwai
3 siblings, 0 replies; 5+ messages in thread
From: Mark Hills @ 2010-05-29 15:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Do not explicity set the default input mode. Use the hardware default
of mode 0 ('Control vinyl'), which is now available.
This reverts commit e3ca4c9.
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
sound/usb/caiaq/device.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index 8052718..bf71048 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -320,12 +320,6 @@ static void __devinit setup_card(struct snd_usb_caiaqdev *dev)
}
break;
- case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ):
- /* Audio 4 DJ - default input mode to phono */
- dev->control_state[0] = 2;
- snd_usb_caiaq_send_command(dev, EP1_CMD_WRITE_IO,
- dev->control_state, 1);
- break;
}
if (dev->spec.num_analog_audio_out +
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] snd-usb-caiaq: Bump version number to 1.3.21
2010-05-29 15:53 [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Mark Hills
2010-05-29 15:53 ` [PATCH 2/4] snd-usb-caiaq: Simplify single case to an 'if' Mark Hills
2010-05-29 15:53 ` [PATCH 3/4] Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ" Mark Hills
@ 2010-05-29 15:53 ` Mark Hills
2010-05-31 7:20 ` [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Takashi Iwai
3 siblings, 0 replies; 5+ messages in thread
From: Mark Hills @ 2010-05-29 15:53 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
sound/usb/caiaq/device.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index bf71048..cdfb856 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -36,7 +36,7 @@
#include "input.h"
MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
-MODULE_DESCRIPTION("caiaq USB audio, version 1.3.20");
+MODULE_DESCRIPTION("caiaq USB audio, version 1.3.21");
MODULE_LICENSE("GPL");
MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},"
"{Native Instruments, RigKontrol3},"
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ
2010-05-29 15:53 [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Mark Hills
` (2 preceding siblings ...)
2010-05-29 15:53 ` [PATCH 4/4] snd-usb-caiaq: Bump version number to 1.3.21 Mark Hills
@ 2010-05-31 7:20 ` Takashi Iwai
3 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2010-05-31 7:20 UTC (permalink / raw)
To: Mark Hills; +Cc: alsa-devel
At Sat, 29 May 2010 16:53:23 +0100,
Mark Hills wrote:
>
> This feature was undocumented on early A4DJ units. It is indicated
> by lighting both the 'line' and 'phono' lamps at the same time.
> Newer units document this and the newer Windows drivers enable this
> for all units, so restore the functionality.
>
> This patch simplifies the code and changes the mode mapping to match
> the A8DJ, favouring simpler code and consistency over keeping the
> existing mapping.
>
> Both 'Control vinyl' and 'Phono' input modes enable the hardware
> preamp. The difference is the input impedance.
>
> This reverts commit 9a9527e.
>
> Acked-by: Daniel Mack <daniel@caiaq.de>
> Signed-off-by: Mark Hills <mark@pogo.org.uk>
Thanks, all 4 patches applied and now in 2.6.35-rc1.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-31 7:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-29 15:53 [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Mark Hills
2010-05-29 15:53 ` [PATCH 2/4] snd-usb-caiaq: Simplify single case to an 'if' Mark Hills
2010-05-29 15:53 ` [PATCH 3/4] Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ" Mark Hills
2010-05-29 15:53 ` [PATCH 4/4] snd-usb-caiaq: Bump version number to 1.3.21 Mark Hills
2010-05-31 7:20 ` [PATCH 1/4] snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).