diff options
Diffstat (limited to 'sound/pci/ctxfi')
| -rw-r--r-- | sound/pci/ctxfi/ctatc.c | 7 | ||||
| -rw-r--r-- | sound/pci/ctxfi/ctdaio.c | 4 | ||||
| -rw-r--r-- | sound/pci/ctxfi/cthardware.c | 6 | ||||
| -rw-r--r-- | sound/pci/ctxfi/xfi.c | 3 | 
4 files changed, 13 insertions, 7 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index b5fa583a239..af632bd0832 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c @@ -435,6 +435,11 @@ atc_pcm_playback_position(struct ct_atc *atc, struct ct_atc_pcm *apcm)  		return 0;  	position = src->ops->get_ca(src); +	if (position < apcm->vm_block->addr) { +		snd_printdd("ctxfi: bad ca - ca=0x%08x, vba=0x%08x, vbs=0x%08x\n", position, apcm->vm_block->addr, apcm->vm_block->size); +		position = apcm->vm_block->addr; +	} +  	size = apcm->vm_block->size;  	max_cisz = src->multi * src->rsc.msr;  	max_cisz = 128 * (max_cisz < 8 ? max_cisz : 8); @@ -1734,8 +1739,6 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,  	if (err < 0)  		goto error1; -	snd_card_set_dev(card, &pci->dev); -  	*ratc = atc;  	return 0; diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c index 0c00eb4088e..84f86bf63b8 100644 --- a/sound/pci/ctxfi/ctdaio.c +++ b/sound/pci/ctxfi/ctdaio.c @@ -33,7 +33,7 @@ struct daio_rsc_idx {  	unsigned short right;  }; -struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = { +static struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = {  	[LINEO1] = {.left = 0x00, .right = 0x01},  	[LINEO2] = {.left = 0x18, .right = 0x19},  	[LINEO3] = {.left = 0x08, .right = 0x09}, @@ -44,7 +44,7 @@ struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = {  	[SPDIFI1] = {.left = 0x95, .right = 0x9d},  }; -struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = { +static struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = {  	[LINEO1] = {.left = 0x40, .right = 0x41},  	[LINEO2] = {.left = 0x60, .right = 0x61},  	[LINEO3] = {.left = 0x50, .right = 0x51}, diff --git a/sound/pci/ctxfi/cthardware.c b/sound/pci/ctxfi/cthardware.c index 110b8ace6d8..a689f255270 100644 --- a/sound/pci/ctxfi/cthardware.c +++ b/sound/pci/ctxfi/cthardware.c @@ -69,7 +69,8 @@ unsigned int get_field(unsigned int data, unsigned int field)  {  	int i; -	BUG_ON(!field); +	if (WARN_ON(!field)) +		return 0;  	/* @field should always be greater than 0 */  	for (i = 0; !(field & (1 << i)); )  		i++; @@ -81,7 +82,8 @@ void set_field(unsigned int *data, unsigned int field, unsigned int value)  {  	int i; -	BUG_ON(!field); +	if (WARN_ON(!field)) +		return;  	/* @field should always be greater than 0 */  	for (i = 0; !(field & (1 << i)); )  		i++; diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c index d464ad2fc7b..98426d09c8b 100644 --- a/sound/pci/ctxfi/xfi.c +++ b/sound/pci/ctxfi/xfi.c @@ -71,7 +71,8 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)  		dev++;  		return -ENOENT;  	} -	err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); +	err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, +			   0, &card);  	if (err)  		return err;  	if ((reference_rate != 48000) && (reference_rate != 44100)) {  | 
