Creative X-Fi Titanium HD ctxfi bugs 5378 5218 4868
A message that is not in the archive (sent off-list or not yet received): [email protected]
Here's a second version of this patch (against 1.0.24) which fixes the input source selection and reverts the PLL hacks.
The PLL initialization for 44100Hz is still unreliable. I'm posting this so the Creative tech support can use it to debug the PLL init code.
Still not to be applied - I'll do another version against the git repository once we have the PLL init sorted.
Harry
alsa-kernel/pci/ctxfi/ct20k2reg.h +1 -0
@@ -55,6 +55,7 @@/* GPIO Registers */ #define GPIO_DATA 0x1B7020#define GPIO_CTRL 0x1B7024 +#define GPIO_EXT_DATA 0x1B70A0/* Virtual memory registers */ #define VMEM_PTPAL 0x1C6300/* 0x1C6300 + (16 * Chn) */
alsa-kernel/pci/ctxfi/ctatc.c +92 -32
224 lines not on this page · raw message
alsa-kernel/pci/ctxfi/ctatc.h +8 -0
@@ -115,12 +115,20 @@int (*line_clfe_unmute)(struct ct_atc *atc,unsigned char state);int (*line_rear_unmute)(struct ct_atc *atc,unsigned char state);int (*line_in_unmute)(struct ct_atc *atc,unsigned char state); +int (*mic_unmute)(struct ct_atc *atc,unsigned char state);int (*spdif_out_unmute)(struct ct_atc *atc,unsigned char state);int (*spdif_in_unmute)(struct ct_atc *atc,unsigned char state);int (*spdif_out_get_status)(struct ct_atc *atc,unsigned int *status);int (*spdif_out_set_status)(struct ct_atc *atc,unsigned int status);int (*spdif_out_passthru)(struct ct_atc *atc,unsigned char state);int (*have_digit_io_switch)(struct ct_atc *atc); +int (*have_dedicated_mic)(struct ct_atc *atc); +int (*have_output_switch)(struct ct_atc *atc); +int (*output_switch_get)(struct ct_atc *atc); +int (*output_switch_put)(struct ct_atc *atc,int position); +int (*have_mic_source_switch)(struct ct_atc *atc); +int (*mic_source_switch_get)(struct ct_atc *atc); +int (*mic_source_switch_put)(struct ct_atc *atc,int position);/* Don't touch! Used for internal object. */ void *rsc_mgrs[NUM_RSCTYP ];/* chip resource managers */
alsa-kernel/pci/ctxfi/ctdaio.c +7 -16
@@ -22,20 +22,9 @@#include <linux/slab.h> #include <linux/kernel.h> -#define DAIO_RESOURCE_NUM NUM_DAIOTYP#define DAIO_OUT_MAX SPDIFOO -union daio_usage { -struct { -unsigned short lineo1:1 ; -unsigned short lineo2:1 ; -unsigned short lineo3:1 ; -unsigned short lineo4:1 ; -unsigned short spdifoo:1 ; -unsigned short lineim:1 ; -unsigned short spdifio:1 ; -unsigned short spdifi1:1 ; - } bf; +struct daio_usage {unsigned short data; };
@@ -61,6 +50,7 @@ [LINEO3] = {.left = 0x50, .right = 0x51}, [LINEO4] = {.left = 0x70, .right = 0x71}, [LINEIM] = {.left = 0x45, .right = 0xc5}, + [MIC] = {.left = 0x55, .right = 0xd5}, [SPDIFOO] = {.left = 0x00, .right = 0x01}, [SPDIFIO] = {.left = 0x05, .right = 0x85}, };
@@ -138,6 +128,7 @@case LINEO3 :return 5 ;case LINEO4 :return 6 ;case LINEIM :return 4 ; +case MIC :return 5 ;default :return -EINVAL ; }default :
@@ -517,17 +508,17 @@static int daio_mgr_get_rsc (struct rsc_mgr *mgr,enum DAIOTYP type) { -if (((union daio_usage *)mgr->rscs)->data & (0x1 << type)) +if (((struct daio_usage *)mgr->rscs)->data & (0x1 << type))return -ENOENT ; - ((union daio_usage *)mgr->rscs)->data |= (0x1 << type); + ((struct daio_usage *)mgr->rscs)->data |= (0x1 << type);return 0 ; }static int daio_mgr_put_rsc (struct rsc_mgr *mgr,enum DAIOTYP type) { - ((union daio_usage *)mgr->rscs)->data &= ~(0x1 << type); + ((struct daio_usage *)mgr->rscs)->data &= ~(0x1 << type);return 0 ; }
@@ -710,7 +701,7 @@if (!daio_mgr)return -ENOMEM ; - err =rsc_mgr_init (&daio_mgr->mgr,DAIO ,DAIO_RESOURCE_NUM , hw); + err =rsc_mgr_init (&daio_mgr->mgr,DAIO ,NUM_DAIOTYP , hw);if (err) goto error1;
alsa-kernel/pci/ctxfi/ctdaio.h +1 -0
@@ -33,6 +33,7 @@SPDIFOO ,/* S/PDIF Out (Flexijack/Optical) */ LINEIM ,SPDIFIO ,/* S/PDIF In (Flexijack/Optical) on the card */ +MIC ,/* Dedicated mic on Titanium HD */ SPDIFI1 ,/* S/PDIF In on internal Drive Bay */ NUM_DAIOTYP };
alsa-kernel/pci/ctxfi/cthardware.h +8 -0
@@ -39,6 +39,7 @@CT20K2_MODEL_FIRST =CTSB0760 ,CTHENDRIX ,CTSB0880 , +CTSB1270 ,CT20K2_UNKNOWN , NUM_CTCARDS /* This should always be the last */ };
@@ -71,6 +72,13 @@int (*is_adc_source_selected)(struct hw *hw,enum ADCSRC source);int (*select_adc_source)(struct hw *hw,enum ADCSRC source);int (*have_digit_io_switch)(struct hw *hw); +int (*have_dedicated_mic)(struct hw *hw); +int (*have_output_switch)(struct hw *hw); +int (*output_switch_get)(struct hw *hw); +int (*output_switch_put)(struct hw *hw,int position); +int (*have_mic_source_switch)(struct hw *hw); +int (*mic_source_switch_get)(struct hw *hw); +int (*mic_source_switch_put)(struct hw *hw,int position);/* SRC operations */ int (*src_rsc_get_ctrl_blk)(void **rblk);
alsa-kernel/pci/ctxfi/cthw20k1.c +18 -0
@@ -1783,6 +1783,21 @@return !(hw->model ==CTSB073X || hw->model ==CTUAA ); } +static int hw_have_dedicated_mic (struct hw *hw) +{ +return 0 ; +} + +static int hw_have_output_switch (struct hw *hw) +{ +return 0 ; +} + +static int hw_have_mic_source_switch (struct hw *hw) +{ +return 0 ; +} +#define CTLBITS (a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))#define UAA_CFG_PWRSTATUS 0x44
@@ -2173,6 +2188,9 @@ .is_adc_source_selected = hw_is_adc_input_selected, .select_adc_source = hw_adc_input_select, .have_digit_io_switch = hw_have_digit_io_switch, + .have_dedicated_mic = hw_have_dedicated_mic, + .have_output_switch = hw_have_output_switch, + .have_mic_source_switch = hw_have_mic_source_switch, #ifdef CONFIG_PM .suspend = hw_suspend, .resume = hw_resume,
alsa-kernel/pci/ctxfi/cthw20k2.c +239 -88
460 lines not on this page · raw message
alsa-kernel/pci/ctxfi/ctmixer.c +106 -31
231 lines not on this page · raw message
alsa-kernel/pci/ctxfi/xfi.c +2 -2
@@ -80,11 +80,11 @@ "are 48000 and 44100, Value 48000 is assumed.\n"); reference_rate =48000 ; } -if ((multiple !=1 ) && (multiple !=2 )) { +if ((multiple !=1 ) && (multiple !=2 ) && (multiple !=4 )) {printk (KERN_ERR "ctxfi: Invalid multiple value %u!!!\n" , multiple);printk (KERN_ERR "ctxfi: The valid values for multiple are " -"1 and 2, Value 2 is assumed.\n" ); +"1, 2 and 4, Value 2 is assumed.\n" ); multiple =2 ; } err = ct_atc_create(card, pci, reference_rate, multiple,
include/pci_ids_compat.h.in +4 -0
@@ -314,6 +314,10 @@ #define PCI_SUBDEVICE_ID_CREATIVE_HENDRIX 0x6000 #endif +#ifndef PCI_SUBDEVICE_ID_CREATIVE_SB1270 +#define PCI_SUBDEVICE_ID_CREATIVE_SB1270 0x0062 +#endif + /* ice1712 */ #ifndef PCI_VENDOR_ID_ICE #define PCI_VENDOR_ID_ICE 0x1412