Commit 8077b7fb authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

EMU10K1/EMU10K2 driver
Fix Audigy + FX8010 capture (hw:x,2)


This patch fixes capture problems from hw:x,2 on Audigy. It is same as
 previous, because it can be applied cleanly against CVS (I tested
version from 23.06.2004) and hope it is still true for current CVS.

I tested 4 channel recrding and it was OK.

hw:x,2 records outputs from FX8010 (not FX buses)

Using 'EFX voices mask' you can set channels what you want record.

use alsactl store to store config
edit this config (set true for needed channel for 'EFX voices mask'
control) - I recorded channels 8,9,14,15 (front and rear output).
use alsactl restore to restore config

Looks like channel count must be power of 2 (1, 2, 4, 8, ...).
Signed-off-by: default avatarPeter Zubaj <pzad@pobox.sk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e421da00
...@@ -452,6 +452,10 @@ static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream) ...@@ -452,6 +452,10 @@ static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream)
snd_emu10k1_ptr_write(emu, ADCCR, 0, 0); snd_emu10k1_ptr_write(emu, ADCCR, 0, 0);
break; break;
case CAPTURE_EFX: case CAPTURE_EFX:
if (emu->audigy) {
snd_emu10k1_ptr_write(emu, A_FXWC1, 0, 0);
snd_emu10k1_ptr_write(emu, A_FXWC2, 0, 0);
} else
snd_emu10k1_ptr_write(emu, FXWC, 0, 0); snd_emu10k1_ptr_write(emu, FXWC, 0, 0);
break; break;
default: default:
...@@ -618,6 +622,10 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream, ...@@ -618,6 +622,10 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val); snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val);
break; break;
case CAPTURE_EFX: case CAPTURE_EFX:
if (emu->audigy) {
snd_emu10k1_ptr_write(emu, A_FXWC1, 0, epcm->capture_cr_val);
snd_emu10k1_ptr_write(emu, A_FXWC2, 0, epcm->capture_cr_val2);
} else
snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val); snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val);
break; break;
default: default:
...@@ -637,6 +645,10 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream, ...@@ -637,6 +645,10 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
snd_emu10k1_ptr_write(emu, ADCCR, 0, 0); snd_emu10k1_ptr_write(emu, ADCCR, 0, 0);
break; break;
case CAPTURE_EFX: case CAPTURE_EFX:
if (emu->audigy) {
snd_emu10k1_ptr_write(emu, A_FXWC1, 0, 0);
snd_emu10k1_ptr_write(emu, A_FXWC2, 0, 0);
} else
snd_emu10k1_ptr_write(emu, FXWC, 0, 0); snd_emu10k1_ptr_write(emu, FXWC, 0, 0);
break; break;
default: default:
......
...@@ -71,31 +71,32 @@ static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, ...@@ -71,31 +71,32 @@ static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu,
static void snd_emu10k1_proc_read(snd_info_entry_t *entry, static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
snd_info_buffer_t * buffer) snd_info_buffer_t * buffer)
{ {
static char *outputs[32] = { /* FIXME - output names are in emufx.c too */
/* 00 */ "PCM Left", static char *creative_outs[32] = {
/* 01 */ "PCM Right", /* 00 */ "AC97 Left",
/* 02 */ "PCM Surround Left", /* 01 */ "AC97 Right",
/* 03 */ "PCM Surround Right", /* 02 */ "Optical IEC958 Left",
/* 04 */ "MIDI Left", /* 03 */ "Optical IEC958 Right",
/* 05 */ "MIDI Right", /* 04 */ "Center",
/* 06 */ "PCM Center", /* 05 */ "LFE",
/* 07 */ "PCM LFE", /* 06 */ "Headphone Left",
/* 08 */ "???", /* 07 */ "Headphone Right",
/* 09 */ "???", /* 08 */ "Surround Left",
/* 10 */ "???", /* 09 */ "Surround Right",
/* 11 */ "???", /* 10 */ "PCM Capture Left",
/* 12 */ "MIDI Reverb", /* 11 */ "PCM Capture Right",
/* 13 */ "MIDI Chorus", /* 12 */ "MIC Capture",
/* 14 */ "???", /* 13 */ "AC97 Surround Left",
/* 14 */ "AC97 Surround Right",
/* 15 */ "???", /* 15 */ "???",
/* 16 */ "???", /* 16 */ "???",
/* 17 */ "???", /* 17 */ "Analog Center",
/* 18 */ "ADC Left / CDROM S/PDIF Left", /* 18 */ "Analog LFE",
/* 19 */ "ADC Right / CDROM S/PDIF Right", /* 19 */ "???",
/* 20 */ "MIC / Zoom Video Left", /* 20 */ "???",
/* 21 */ "Zoom Video Right", /* 21 */ "???",
/* 22 */ "S/PDIF Left", /* 22 */ "???",
/* 23 */ "S/PDIF Right", /* 23 */ "???",
/* 24 */ "???", /* 24 */ "???",
/* 25 */ "???", /* 25 */ "???",
/* 26 */ "???", /* 26 */ "???",
...@@ -105,9 +106,78 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry, ...@@ -105,9 +106,78 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
/* 30 */ "???", /* 30 */ "???",
/* 31 */ "???" /* 31 */ "???"
}; };
static char *audigy_outs[64] = {
/* 00 */ "Digital Front Left",
/* 01 */ "Digital Front Right",
/* 02 */ "Digital Center",
/* 03 */ "Digital LEF",
/* 04 */ "Headphone Left",
/* 05 */ "Headphone Right",
/* 06 */ "Digital Rear Left",
/* 07 */ "Digital Rear Right",
/* 08 */ "Front Left",
/* 09 */ "Front Right",
/* 10 */ "Center",
/* 11 */ "LFE",
/* 12 */ "???",
/* 13 */ "???",
/* 14 */ "Rear Left",
/* 15 */ "Rear Right",
/* 16 */ "AC97 Front Left",
/* 17 */ "AC97 Front Right",
/* 18 */ "ADC Caputre Left",
/* 19 */ "ADC Capture Right",
/* 20 */ "???",
/* 21 */ "???",
/* 22 */ "???",
/* 23 */ "???",
/* 24 */ "???",
/* 25 */ "???",
/* 26 */ "???",
/* 27 */ "???",
/* 28 */ "???",
/* 29 */ "???",
/* 30 */ "???",
/* 31 */ "???",
/* 32 */ "???",
/* 33 */ "???",
/* 34 */ "???",
/* 35 */ "???",
/* 36 */ "???",
/* 37 */ "???",
/* 38 */ "???",
/* 39 */ "???",
/* 40 */ "???",
/* 41 */ "???",
/* 42 */ "???",
/* 43 */ "???",
/* 44 */ "???",
/* 45 */ "???",
/* 46 */ "???",
/* 47 */ "???",
/* 48 */ "???",
/* 49 */ "???",
/* 50 */ "???",
/* 51 */ "???",
/* 52 */ "???",
/* 53 */ "???",
/* 54 */ "???",
/* 55 */ "???",
/* 56 */ "???",
/* 57 */ "???",
/* 58 */ "???",
/* 59 */ "???",
/* 60 */ "???",
/* 61 */ "???",
/* 62 */ "???",
/* 33 */ "???"
};
emu10k1_t *emu = snd_magic_cast(emu10k1_t, entry->private_data, return); emu10k1_t *emu = snd_magic_cast(emu10k1_t, entry->private_data, return);
unsigned int val; unsigned int val;
int nefx = emu->audigy ? 64 : 32; int nefx = emu->audigy ? 64 : 32;
char **outputs = emu->audigy ? audigy_outs : creative_outs;
int idx; int idx;
snd_iprintf(buffer, "EMU10K1\n\n"); snd_iprintf(buffer, "EMU10K1\n\n");
...@@ -135,7 +205,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry, ...@@ -135,7 +205,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
snd_iprintf(buffer, "\nCaptured FX Outputs :\n"); snd_iprintf(buffer, "\nCaptured FX Outputs :\n");
for (idx = 0; idx < nefx; idx++) { for (idx = 0; idx < nefx; idx++) {
if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) if (emu->efx_voices_mask[idx/32] & (1 << (idx%32)))
snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx%32]); snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]);
} }
snd_iprintf(buffer, "\nAll FX Outputs :\n"); snd_iprintf(buffer, "\nAll FX Outputs :\n");
for (idx = 0; idx < 32; idx++) for (idx = 0; idx < 32; idx++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment