Commit 3b199871 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

D:2003/08/29 10:22:27
C:EMU10K1/EMU10K2 driver
A:Takashi Iwai <tiwai@suse.de>
F:include/emu10k1.h:1.30->1.31 
F:pci/emu10k1/emu10k1.c:1.20->1.21 
F:pci/emu10k1/emufx.c:1.37->1.38 
F:pci/emu10k1/emupcm.c:1.21->1.22 
L:Peter Zubaj <pzad@pobox.sk>:
L:- Added the support of AC3 passthrough on Audigy.
L:
L:James Courtier-Dutton <James@superbug.demon.co.uk>:
L:- Use different driver name for Audigy2.
parent 5e63ebca
...@@ -1152,6 +1152,8 @@ int snd_emu10k1_proc_init(emu10k1_t * emu); ...@@ -1152,6 +1152,8 @@ int snd_emu10k1_proc_init(emu10k1_t * emu);
#define FXBUS_MIDI_RIGHT 0x05 #define FXBUS_MIDI_RIGHT 0x05
#define FXBUS_PCM_CENTER 0x06 #define FXBUS_PCM_CENTER 0x06
#define FXBUS_PCM_LFE 0x07 #define FXBUS_PCM_LFE 0x07
#define FXBUS_PT_LEFT 20
#define FXBUS_PT_RIGHT 21
#define FXBUS_MIDI_REVERB 0x0c #define FXBUS_MIDI_REVERB 0x0c
#define FXBUS_MIDI_CHORUS 0x0d #define FXBUS_MIDI_CHORUS 0x0d
......
...@@ -170,7 +170,10 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci, ...@@ -170,7 +170,10 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
} }
#endif #endif
if (emu->audigy) { if (emu->audigy && (emu->revision == 4) ) {
strcpy(card->driver, "Audigy2");
strcpy(card->shortname, "Sound Blaster Audigy2");
} else if (emu->audigy) {
strcpy(card->driver, "Audigy"); strcpy(card->driver, "Audigy");
strcpy(card->shortname, "Sound Blaster Audigy"); strcpy(card->shortname, "Sound Blaster Audigy");
} else if (emu->APS) { } else if (emu->APS) {
......
...@@ -1235,6 +1235,7 @@ static void __devinit snd_emu10k1_init_stereo_onoff_control(emu10k1_fx8010_contr ...@@ -1235,6 +1235,7 @@ static void __devinit snd_emu10k1_init_stereo_onoff_control(emu10k1_fx8010_contr
*/ */
#define A_GPR_ACCU 0xd6 #define A_GPR_ACCU 0xd6
#define A_GPR_COND 0xd7
static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu) static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
{ {
...@@ -1504,12 +1505,6 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input)) ...@@ -1504,12 +1505,6 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
gpr += 2; gpr += 2;
} }
/* digital outputs */
A_PUT_STEREO_OUTPUT(A_EXTOUT_FRONT_L, A_EXTOUT_FRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS);
A_PUT_STEREO_OUTPUT(A_EXTOUT_REAR_L, A_EXTOUT_REAR_R, playback+2 + SND_EMU10K1_PLAYBACK_CHANNELS);
A_PUT_OUTPUT(A_EXTOUT_CENTER, playback+4 + SND_EMU10K1_PLAYBACK_CHANNELS);
A_PUT_OUTPUT(A_EXTOUT_LFE, playback+5 + SND_EMU10K1_PLAYBACK_CHANNELS);
/* analog speakers */ /* analog speakers */
if (emu->revision == 4) { /* audigy2 */ if (emu->revision == 4) { /* audigy2 */
A_PUT_STEREO_OUTPUT(A_EXTOUT_AFRONT_L, A_EXTOUT_AFRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); A_PUT_STEREO_OUTPUT(A_EXTOUT_AFRONT_L, A_EXTOUT_AFRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS);
...@@ -1523,6 +1518,29 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input)) ...@@ -1523,6 +1518,29 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
/* headphone */ /* headphone */
A_PUT_STEREO_OUTPUT(A_EXTOUT_HEADPHONE_L, A_EXTOUT_HEADPHONE_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); A_PUT_STEREO_OUTPUT(A_EXTOUT_HEADPHONE_L, A_EXTOUT_HEADPHONE_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS);
/* digital outputs */
// A_PUT_STEREO_OUTPUT(A_EXTOUT_FRONT_L, A_EXTOUT_FRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS);
/* IEC958 Optical Raw Playback Switch */
icode->gpr_map[gpr++] = 0x1008;
icode->gpr_map[gpr++] = 0xffff0000;
for (z = 0; z < 2; z++) {
A_OP(icode, &ptr, iMAC0, A_GPR(tmp + 2), A_FXBUS(FXBUS_PT_LEFT + z), A_C_00000000, A_C_00000000);
A_OP(icode, &ptr, iSKIP, A_GPR_COND, A_GPR_COND, A_GPR(gpr - 2), A_C_00000001);
A_OP(icode, &ptr, iACC3, A_GPR(tmp + 2), A_C_00000000, A_C_00010000, A_GPR(tmp + 2));
A_OP(icode, &ptr, iANDXOR, A_GPR(tmp + 2), A_GPR(tmp + 2), A_GPR(gpr - 1), A_C_00000000);
A_SWITCH(icode, &ptr, tmp + 0, tmp + 2, gpr + z);
A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z);
A_SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1);
A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000);
}
snd_emu10k1_init_stereo_onoff_control(controls + nctl++, "IEC958 Optical Raw Playback Switch", gpr, 0);
gpr += 2;
A_PUT_STEREO_OUTPUT(A_EXTOUT_REAR_L, A_EXTOUT_REAR_R, playback+2 + SND_EMU10K1_PLAYBACK_CHANNELS);
A_PUT_OUTPUT(A_EXTOUT_CENTER, playback+4 + SND_EMU10K1_PLAYBACK_CHANNELS);
A_PUT_OUTPUT(A_EXTOUT_LFE, playback+5 + SND_EMU10K1_PLAYBACK_CHANNELS);
/* ADC buffer */ /* ADC buffer */
A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_L, capture); A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_L, capture);
A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_R, capture+1); A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_R, capture+1);
......
...@@ -666,8 +666,11 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * subs ...@@ -666,8 +666,11 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * subs
#else /* EMU10K1 Open Source code from Creative */ #else /* EMU10K1 Open Source code from Creative */
if (ptr < epcm->ccca_start_addr) if (ptr < epcm->ccca_start_addr)
ptr += runtime->buffer_size - epcm->ccca_start_addr; ptr += runtime->buffer_size - epcm->ccca_start_addr;
else else {
ptr -= epcm->ccca_start_addr; ptr -= epcm->ccca_start_addr;
if (ptr >= runtime->buffer_size)
ptr -= runtime->buffer_size;
}
#endif #endif
// printk("ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", ptr, runtime->buffer_size, runtime->period_size); // printk("ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", ptr, runtime->buffer_size, runtime->period_size);
return ptr; return ptr;
......
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