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,7 +452,11 @@ static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream)
snd_emu10k1_ptr_write(emu, ADCCR, 0, 0);
break;
case CAPTURE_EFX:
snd_emu10k1_ptr_write(emu, FXWC, 0, 0);
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);
break;
default:
break;
......@@ -618,7 +622,11 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val);
break;
case CAPTURE_EFX:
snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val);
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);
break;
default:
break;
......@@ -637,7 +645,11 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
snd_emu10k1_ptr_write(emu, ADCCR, 0, 0);
break;
case CAPTURE_EFX:
snd_emu10k1_ptr_write(emu, FXWC, 0, 0);
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);
break;
default:
break;
......
......@@ -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,
snd_info_buffer_t * buffer)
{
static char *outputs[32] = {
/* 00 */ "PCM Left",
/* 01 */ "PCM Right",
/* 02 */ "PCM Surround Left",
/* 03 */ "PCM Surround Right",
/* 04 */ "MIDI Left",
/* 05 */ "MIDI Right",
/* 06 */ "PCM Center",
/* 07 */ "PCM LFE",
/* 08 */ "???",
/* 09 */ "???",
/* 10 */ "???",
/* 11 */ "???",
/* 12 */ "MIDI Reverb",
/* 13 */ "MIDI Chorus",
/* 14 */ "???",
/* FIXME - output names are in emufx.c too */
static char *creative_outs[32] = {
/* 00 */ "AC97 Left",
/* 01 */ "AC97 Right",
/* 02 */ "Optical IEC958 Left",
/* 03 */ "Optical IEC958 Right",
/* 04 */ "Center",
/* 05 */ "LFE",
/* 06 */ "Headphone Left",
/* 07 */ "Headphone Right",
/* 08 */ "Surround Left",
/* 09 */ "Surround Right",
/* 10 */ "PCM Capture Left",
/* 11 */ "PCM Capture Right",
/* 12 */ "MIC Capture",
/* 13 */ "AC97 Surround Left",
/* 14 */ "AC97 Surround Right",
/* 15 */ "???",
/* 16 */ "???",
/* 17 */ "???",
/* 18 */ "ADC Left / CDROM S/PDIF Left",
/* 19 */ "ADC Right / CDROM S/PDIF Right",
/* 20 */ "MIC / Zoom Video Left",
/* 21 */ "Zoom Video Right",
/* 22 */ "S/PDIF Left",
/* 23 */ "S/PDIF Right",
/* 17 */ "Analog Center",
/* 18 */ "Analog LFE",
/* 19 */ "???",
/* 20 */ "???",
/* 21 */ "???",
/* 22 */ "???",
/* 23 */ "???",
/* 24 */ "???",
/* 25 */ "???",
/* 26 */ "???",
......@@ -105,9 +106,78 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
/* 30 */ "???",
/* 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);
unsigned int val;
int nefx = emu->audigy ? 64 : 32;
char **outputs = emu->audigy ? audigy_outs : creative_outs;
int idx;
snd_iprintf(buffer, "EMU10K1\n\n");
......@@ -135,7 +205,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
snd_iprintf(buffer, "\nCaptured FX Outputs :\n");
for (idx = 0; idx < nefx; idx++) {
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");
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