diff options
Diffstat (limited to 'sound/pci/emu10k1/io.c')
-rw-r--r-- | sound/pci/emu10k1/io.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c index 7d0cb9db4280..08a0cb545822 100644 --- a/sound/pci/emu10k1/io.c +++ b/sound/pci/emu10k1/io.c | |||
@@ -130,15 +130,18 @@ int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, | |||
130 | unsigned int reset, set; | 130 | unsigned int reset, set; |
131 | unsigned int reg, tmp; | 131 | unsigned int reg, tmp; |
132 | int n, result; | 132 | int n, result; |
133 | if (emu->card_capabilities->ca0108_chip) { | 133 | if (emu->card_capabilities->ca0108_chip) |
134 | reg=0x3c; /* PTR20, reg 0x3c */ | 134 | reg = 0x3c; /* PTR20, reg 0x3c */ |
135 | } else { | 135 | else { |
136 | return 1; /* For other cards types the SPI register is currently unknown. */ | 136 | /* For other chip types the SPI register |
137 | * is currently unknown. */ | ||
138 | return 1; | ||
137 | } | 139 | } |
138 | if (data > 0xffff) return 1; /* Only 16bit values allowed */ | 140 | if (data > 0xffff) /* Only 16bit values allowed */ |
141 | return 1; | ||
139 | 142 | ||
140 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); | 143 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); |
141 | reset = (tmp & ~0x3ffff) | 0x20000; /* Set xxx20000 */ | 144 | reset = (tmp & ~0x3ffff) | 0x20000; /* Set xxx20000 */ |
142 | set = reset | 0x10000; /* Set xxx1xxxx */ | 145 | set = reset | 0x10000; /* Set xxx1xxxx */ |
143 | snd_emu10k1_ptr20_write(emu, reg, 0, reset | data); | 146 | snd_emu10k1_ptr20_write(emu, reg, 0, reset | data); |
144 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* write post */ | 147 | tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* write post */ |