aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/p16v.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/p16v.c')
-rw-r--r--sound/pci/emu10k1/p16v.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 4e0f95438f47..465f8d505329 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -253,7 +253,7 @@ static int snd_p16v_pcm_close_playback(struct snd_pcm_substream *substream)
253 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 253 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
254 //struct snd_pcm_runtime *runtime = substream->runtime; 254 //struct snd_pcm_runtime *runtime = substream->runtime;
255 //struct snd_emu10k1_pcm *epcm = runtime->private_data; 255 //struct snd_emu10k1_pcm *epcm = runtime->private_data;
256 emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use=0; 256 emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use = 0;
257 /* FIXME: maybe zero others */ 257 /* FIXME: maybe zero others */
258 return 0; 258 return 0;
259} 259}
@@ -264,7 +264,7 @@ static int snd_p16v_pcm_close_capture(struct snd_pcm_substream *substream)
264 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); 264 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
265 //struct snd_pcm_runtime *runtime = substream->runtime; 265 //struct snd_pcm_runtime *runtime = substream->runtime;
266 //struct snd_emu10k1_pcm *epcm = runtime->private_data; 266 //struct snd_emu10k1_pcm *epcm = runtime->private_data;
267 emu->p16v_capture_voice.use=0; 267 emu->p16v_capture_voice.use = 0;
268 /* FIXME: maybe zero others */ 268 /* FIXME: maybe zero others */
269 return 0; 269 return 0;
270} 270}
@@ -349,7 +349,7 @@ static int snd_p16v_pcm_prepare_playback(struct snd_pcm_substream *substream)
349 break; 349 break;
350 } 350 }
351 /* FIXME: Check emu->buffer.size before actually writing to it. */ 351 /* FIXME: Check emu->buffer.size before actually writing to it. */
352 for(i=0; i < runtime->periods; i++) { 352 for(i = 0; i < runtime->periods; i++) {
353 table_base[i*2]=runtime->dma_addr+(i*period_size_bytes); 353 table_base[i*2]=runtime->dma_addr+(i*period_size_bytes);
354 table_base[(i*2)+1]=period_size_bytes<<16; 354 table_base[(i*2)+1]=period_size_bytes<<16;
355 } 355 }
@@ -394,7 +394,7 @@ static int snd_p16v_pcm_prepare_capture(struct snd_pcm_substream *substream)
394 /* FIXME: Check emu->buffer.size before actually writing to it. */ 394 /* FIXME: Check emu->buffer.size before actually writing to it. */
395 snd_emu10k1_ptr20_write(emu, 0x13, channel, 0); 395 snd_emu10k1_ptr20_write(emu, 0x13, channel, 0);
396 snd_emu10k1_ptr20_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr); 396 snd_emu10k1_ptr20_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr);
397 snd_emu10k1_ptr20_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size)<<16); // buffer size in bytes 397 snd_emu10k1_ptr20_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffer_size) << 16); // buffer size in bytes
398 snd_emu10k1_ptr20_write(emu, CAPTURE_POINTER, channel, 0); 398 snd_emu10k1_ptr20_write(emu, CAPTURE_POINTER, channel, 0);
399 //snd_emu10k1_ptr20_write(emu, CAPTURE_SOURCE, 0x0, 0x333300e4); /* Select MIC or Line in */ 399 //snd_emu10k1_ptr20_write(emu, CAPTURE_SOURCE, 0x0, 0x333300e4); /* Select MIC or Line in */
400 //snd_emu10k1_ptr20_write(emu, EXTENDED_INT_MASK, 0, snd_emu10k1_ptr20_read(emu, EXTENDED_INT_MASK, 0) | (0x110000<<channel)); 400 //snd_emu10k1_ptr20_write(emu, EXTENDED_INT_MASK, 0, snd_emu10k1_ptr20_read(emu, EXTENDED_INT_MASK, 0) | (0x110000<<channel));
@@ -437,7 +437,7 @@ static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream,
437 struct snd_pcm_substream *s; 437 struct snd_pcm_substream *s;
438 u32 basic = 0; 438 u32 basic = 0;
439 u32 inte = 0; 439 u32 inte = 0;
440 int running=0; 440 int running = 0;
441 441
442 switch (cmd) { 442 switch (cmd) {
443 case SNDRV_PCM_TRIGGER_START: 443 case SNDRV_PCM_TRIGGER_START:
@@ -445,7 +445,7 @@ static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream,
445 break; 445 break;
446 case SNDRV_PCM_TRIGGER_STOP: 446 case SNDRV_PCM_TRIGGER_STOP:
447 default: 447 default:
448 running=0; 448 running = 0;
449 break; 449 break;
450 } 450 }
451 snd_pcm_group_for_each(pos, substream) { 451 snd_pcm_group_for_each(pos, substream) {
@@ -785,7 +785,7 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
785 } 785 }
786 return change; 786 return change;
787} 787}
788static DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1); 788static const DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1);
789 789
790#define P16V_VOL(xname,xreg,xhl) { \ 790#define P16V_VOL(xname,xreg,xhl) { \
791 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 791 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \