aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/p16v.c
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2006-10-01 05:48:04 -0400
committerJaroslav Kysela <perex@suse.cz>2007-02-09 02:59:59 -0500
commit9f4bd5dde81b5cb94e4f52f2f05825aa0422f1ff (patch)
tree884d0016c361a555ab1bc95287e64a6c109a0609 /sound/pci/emu10k1/p16v.c
parent5986a2ec35836a878350c54af4bd91b1de6abc59 (diff)
[ALSA] snd-emu10k1: Added support for emu1010, including E-Mu 1212m and E-Mu 1820m
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/emu10k1/p16v.c')
-rw-r--r--sound/pci/emu10k1/p16v.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 4e0f95438f47..5da637c73393 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) {