Lines Matching +full:8 +full:- +full:channel
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
8 * Output fixed at S32_LE, 2 channel to hw:0,0
15 * Use 2 channel output streams instead of 8 channel.
16 * (8 channel output streams might be good for ASIO type output)
17 * Corrected speaker output, so Front -> Front etc.
36 * Merging with snd-emu10k1 driver.
38 * One stereo channel at 24bit now works.
42 * Integrated with snd-emu10k1 driver.
50 * setting HD Capture channel to 0 captures from CDROM digital input.
51 * setting HD Capture channel to 1 captures from SPDIF in.
56 * Some stability problems when unloading the snd-p16v kernel module.
57 * --
64 * --
67 * P16V Chip: CA0151-DBS
68 * Audigy 2 Chip: CA0102-IAT
71 * DAC: CS4382-K (8-channel, 24bit, 192Khz)
92 #define SET_CHANNEL 0 /* Testing channel outputs 0=Front, 1=Center/LFE, 2=Unknown, 3=Rear */
103 * Class 0401: 1102:0004 (rev 04) Subsystem: 1102:2002 -> Audigy2 ZS 7.1 Model:SB0350
104 * Class 0401: 1102:0004 (rev 04) Subsystem: 1102:1007 -> Audigy2 6.1 Model:SB0240
105 …* Class 0401: 1102:0004 (rev 04) Subsystem: 1102:1002 -> Audigy2 Platinum Model:SB msb02402300092…
106 …* Class 0401: 1102:0004 (rev 04) Subsystem: 1102:2007 -> Audigy4 Pro Model:SB0380 M1SB038047200190…
118 .formats = SNDRV_PCM_FMTBIT_S32_LE, /* Only supports 24-bit samples padded to 32 bits. */
122 .channels_min = 8,
123 .channels_max = 8,
124 .buffer_bytes_max = ((65536 - 64) * 8),
126 .period_bytes_max = (65536 - 64),
128 .periods_max = 8,
144 .buffer_bytes_max = (65536 - 64),
146 .period_bytes_max = (65536 - 128) >> 1, /* size has to be N*64 bytes */
154 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_free_substream()
163 struct snd_emu10k1_voice *channel = &(emu->p16v_voices[channel_id]); in snd_p16v_pcm_open_playback_channel() local
165 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_playback_channel()
169 /* dev_dbg(emu->card->dev, "epcm kcalloc: %p\n", epcm); */ in snd_p16v_pcm_open_playback_channel()
172 return -ENOMEM; in snd_p16v_pcm_open_playback_channel()
173 epcm->emu = emu; in snd_p16v_pcm_open_playback_channel()
174 epcm->substream = substream; in snd_p16v_pcm_open_playback_channel()
176 dev_dbg(emu->card->dev, "epcm device=%d, channel_id=%d\n", in snd_p16v_pcm_open_playback_channel()
177 substream->pcm->device, channel_id); in snd_p16v_pcm_open_playback_channel()
179 runtime->private_data = epcm; in snd_p16v_pcm_open_playback_channel()
180 runtime->private_free = snd_p16v_pcm_free_substream; in snd_p16v_pcm_open_playback_channel()
182 runtime->hw = snd_p16v_playback_hw; in snd_p16v_pcm_open_playback_channel()
184 channel->emu = emu; in snd_p16v_pcm_open_playback_channel()
185 channel->number = channel_id; in snd_p16v_pcm_open_playback_channel()
187 channel->use=1; in snd_p16v_pcm_open_playback_channel()
189 dev_dbg(emu->card->dev, in snd_p16v_pcm_open_playback_channel()
190 "p16v: open channel_id=%d, channel=%p, use=0x%x\n", in snd_p16v_pcm_open_playback_channel()
191 channel_id, channel, channel->use); in snd_p16v_pcm_open_playback_channel()
192 dev_dbg(emu->card->dev, "open:channel_id=%d, chip=%p, channel=%p\n", in snd_p16v_pcm_open_playback_channel()
193 channel_id, chip, channel); in snd_p16v_pcm_open_playback_channel()
195 /* channel->interrupt = snd_p16v_pcm_channel_interrupt; */ in snd_p16v_pcm_open_playback_channel()
196 channel->epcm = epcm; in snd_p16v_pcm_open_playback_channel()
201 runtime->sync.id32[0] = substream->pcm->card->number; in snd_p16v_pcm_open_playback_channel()
202 runtime->sync.id32[1] = 'P'; in snd_p16v_pcm_open_playback_channel()
203 runtime->sync.id32[2] = 16; in snd_p16v_pcm_open_playback_channel()
204 runtime->sync.id32[3] = 'V'; in snd_p16v_pcm_open_playback_channel()
212 struct snd_emu10k1_voice *channel = &(emu->p16v_capture_voice); in snd_p16v_pcm_open_capture_channel() local
214 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_capture_channel()
218 /* dev_dbg(emu->card->dev, "epcm kcalloc: %p\n", epcm); */ in snd_p16v_pcm_open_capture_channel()
221 return -ENOMEM; in snd_p16v_pcm_open_capture_channel()
222 epcm->emu = emu; in snd_p16v_pcm_open_capture_channel()
223 epcm->substream = substream; in snd_p16v_pcm_open_capture_channel()
225 dev_dbg(emu->card->dev, "epcm device=%d, channel_id=%d\n", in snd_p16v_pcm_open_capture_channel()
226 substream->pcm->device, channel_id); in snd_p16v_pcm_open_capture_channel()
228 runtime->private_data = epcm; in snd_p16v_pcm_open_capture_channel()
229 runtime->private_free = snd_p16v_pcm_free_substream; in snd_p16v_pcm_open_capture_channel()
231 runtime->hw = snd_p16v_capture_hw; in snd_p16v_pcm_open_capture_channel()
233 channel->emu = emu; in snd_p16v_pcm_open_capture_channel()
234 channel->number = channel_id; in snd_p16v_pcm_open_capture_channel()
236 channel->use=1; in snd_p16v_pcm_open_capture_channel()
238 dev_dbg(emu->card->dev, in snd_p16v_pcm_open_capture_channel()
239 "p16v: open channel_id=%d, channel=%p, use=0x%x\n", in snd_p16v_pcm_open_capture_channel()
240 channel_id, channel, channel->use); in snd_p16v_pcm_open_capture_channel()
241 dev_dbg(emu->card->dev, "open:channel_id=%d, chip=%p, channel=%p\n", in snd_p16v_pcm_open_capture_channel()
242 channel_id, chip, channel); in snd_p16v_pcm_open_capture_channel()
244 /* channel->interrupt = snd_p16v_pcm_channel_interrupt; */ in snd_p16v_pcm_open_capture_channel()
245 channel->epcm = epcm; in snd_p16v_pcm_open_capture_channel()
258 //struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_close_playback()
259 //struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_close_playback()
260 emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use = 0; in snd_p16v_pcm_close_playback()
269 //struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_close_capture()
270 //struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_close_capture()
271 emu->p16v_capture_voice.use = 0; in snd_p16v_pcm_close_capture()
283 // Only using channel 0 for now, but the card has 2 channels. in snd_p16v_pcm_open_capture()
291 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_prepare_playback()
292 int channel = substream->pcm->device - emu->p16v_device_offset; in snd_p16v_pcm_prepare_playback() local
293 u32 *table_base = (u32 *)(emu->p16v_buffer->area+(8*16*channel)); in snd_p16v_pcm_prepare_playback()
294 u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); in snd_p16v_pcm_prepare_playback()
299 dev_dbg(emu->card->dev, in snd_p16v_pcm_prepare_playback()
303 channel, runtime->rate, runtime->format, runtime->channels, in snd_p16v_pcm_prepare_playback()
304 runtime->buffer_size, runtime->period_size, in snd_p16v_pcm_prepare_playback()
305 runtime->periods, frames_to_bytes(runtime, 1)); in snd_p16v_pcm_prepare_playback()
306 dev_dbg(emu->card->dev, in snd_p16v_pcm_prepare_playback()
308 runtime->dma_addr, runtime->dma_area, table_base); in snd_p16v_pcm_prepare_playback()
309 dev_dbg(emu->card->dev, in snd_p16v_pcm_prepare_playback()
311 emu->p16v_buffer->addr, emu->p16v_buffer->area, in snd_p16v_pcm_prepare_playback()
312 emu->p16v_buffer->bytes); in snd_p16v_pcm_prepare_playback()
314 tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel); in snd_p16v_pcm_prepare_playback()
315 switch (runtime->rate) { in snd_p16v_pcm_prepare_playback()
317 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe0e0) | 0x8080); in snd_p16v_pcm_prepare_playback()
320 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe0e0) | 0x4040); in snd_p16v_pcm_prepare_playback()
323 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe0e0) | 0x2020); in snd_p16v_pcm_prepare_playback()
327 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe0e0) | 0x0000); in snd_p16v_pcm_prepare_playback()
330 /* FIXME: Check emu->buffer.size before actually writing to it. */ in snd_p16v_pcm_prepare_playback()
331 for(i = 0; i < runtime->periods; i++) { in snd_p16v_pcm_prepare_playback()
332 table_base[i*2]=runtime->dma_addr+(i*period_size_bytes); in snd_p16v_pcm_prepare_playback()
336 snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_ADDR, channel, emu->p16v_buffer->addr+(8*16*channel)); in snd_p16v_pcm_prepare_playback()
337 snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19); in snd_p16v_pcm_prepare_playback()
338 snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_PTR, channel, 0); in snd_p16v_pcm_prepare_playback()
339 snd_emu10k1_ptr20_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr); in snd_p16v_pcm_prepare_playback()
340 …//snd_emu10k1_ptr20_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->pe… in snd_p16v_pcm_prepare_playback()
341 snd_emu10k1_ptr20_write(emu, PLAYBACK_PERIOD_SIZE, channel, 0); // buffer size in bytes in snd_p16v_pcm_prepare_playback()
342 snd_emu10k1_ptr20_write(emu, PLAYBACK_POINTER, channel, 0); in snd_p16v_pcm_prepare_playback()
343 snd_emu10k1_ptr20_write(emu, 0x07, channel, 0x0); in snd_p16v_pcm_prepare_playback()
344 snd_emu10k1_ptr20_write(emu, 0x08, channel, 0); in snd_p16v_pcm_prepare_playback()
353 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_prepare_capture()
354 int channel = substream->pcm->device - emu->p16v_device_offset; in snd_p16v_pcm_prepare_capture() local
358 dev_dbg(emu->card->dev, "prepare capture:channel_number=%d, rate=%d, " in snd_p16v_pcm_prepare_capture()
361 channel, runtime->rate, runtime->format, runtime->channels, in snd_p16v_pcm_prepare_capture()
362 runtime->buffer_size, runtime->period_size, in snd_p16v_pcm_prepare_capture()
365 tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel); in snd_p16v_pcm_prepare_capture()
366 switch (runtime->rate) { in snd_p16v_pcm_prepare_capture()
368 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0x0e00) | 0x0800); in snd_p16v_pcm_prepare_capture()
371 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0x0e00) | 0x0400); in snd_p16v_pcm_prepare_capture()
374 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0x0e00) | 0x0200); in snd_p16v_pcm_prepare_capture()
378 snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0x0e00) | 0x0000); in snd_p16v_pcm_prepare_capture()
381 /* FIXME: Check emu->buffer.size before actually writing to it. */ in snd_p16v_pcm_prepare_capture()
382 snd_emu10k1_ptr20_write(emu, 0x13, channel, 0); in snd_p16v_pcm_prepare_capture()
383 snd_emu10k1_ptr20_write(emu, CAPTURE_DMA_ADDR, channel, runtime->dma_addr); in snd_p16v_pcm_prepare_capture()
384 …snd_emu10k1_ptr20_write(emu, CAPTURE_BUFFER_SIZE, channel, frames_to_bytes(runtime, runtime->buffe… in snd_p16v_pcm_prepare_capture()
385 snd_emu10k1_ptr20_write(emu, CAPTURE_POINTER, channel, 0); in snd_p16v_pcm_prepare_capture()
387 …mu, EXTENDED_INT_MASK, 0, snd_emu10k1_ptr20_read(emu, EXTENDED_INT_MASK, 0) | (0x110000<<channel)); in snd_p16v_pcm_prepare_capture()
397 spin_lock_irqsave(&emu->emu_lock, flags); in snd_p16v_intr_enable()
398 enable = inl(emu->port + INTE2) | intrenb; in snd_p16v_intr_enable()
399 outl(enable, emu->port + INTE2); in snd_p16v_intr_enable()
400 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_p16v_intr_enable()
408 spin_lock_irqsave(&emu->emu_lock, flags); in snd_p16v_intr_disable()
409 disable = inl(emu->port + INTE2) & (~intrenb); in snd_p16v_intr_disable()
410 outl(disable, emu->port + INTE2); in snd_p16v_intr_disable()
411 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_p16v_intr_disable()
421 int channel; in snd_p16v_pcm_trigger_playback() local
439 s->stream != SNDRV_PCM_STREAM_PLAYBACK) in snd_p16v_pcm_trigger_playback()
441 runtime = s->runtime; in snd_p16v_pcm_trigger_playback()
442 epcm = runtime->private_data; in snd_p16v_pcm_trigger_playback()
443 channel = substream->pcm->device-emu->p16v_device_offset; in snd_p16v_pcm_trigger_playback()
444 /* dev_dbg(emu->card->dev, "p16v channel=%d\n", channel); */ in snd_p16v_pcm_trigger_playback()
445 epcm->running = running; in snd_p16v_pcm_trigger_playback()
446 basic |= (0x1<<channel); in snd_p16v_pcm_trigger_playback()
447 inte |= (INTE2_PLAYBACK_CH_0_LOOP<<channel); in snd_p16v_pcm_trigger_playback()
450 /* dev_dbg(emu->card->dev, "basic=0x%x, inte=0x%x\n", basic, inte); */ in snd_p16v_pcm_trigger_playback()
462 result = -EINVAL; in snd_p16v_pcm_trigger_playback()
473 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_trigger_capture()
474 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_trigger_capture()
475 int channel = 0; in snd_p16v_pcm_trigger_capture() local
482 …0_write(emu, BASIC_INTERRUPT, 0, snd_emu10k1_ptr20_read(emu, BASIC_INTERRUPT, 0)|(0x100<<channel)); in snd_p16v_pcm_trigger_capture()
483 epcm->running = 1; in snd_p16v_pcm_trigger_capture()
486 …rite(emu, BASIC_INTERRUPT, 0, snd_emu10k1_ptr20_read(emu, BASIC_INTERRUPT, 0) & ~(0x100<<channel)); in snd_p16v_pcm_trigger_capture()
488 …u, EXTENDED_INT_MASK, 0, snd_emu10k1_ptr20_read(emu, EXTENDED_INT_MASK, 0) & ~(0x110000<<channel)); in snd_p16v_pcm_trigger_capture()
489 epcm->running = 0; in snd_p16v_pcm_trigger_capture()
492 result = -EINVAL; in snd_p16v_pcm_trigger_capture()
503 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_pointer_playback()
504 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_pointer_playback()
506 int channel = substream->pcm->device - emu->p16v_device_offset; in snd_p16v_pcm_pointer_playback() local
507 if (!epcm->running) in snd_p16v_pcm_pointer_playback()
510 ptr3 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel); in snd_p16v_pcm_pointer_playback()
511 ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel); in snd_p16v_pcm_pointer_playback()
512 ptr4 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel); in snd_p16v_pcm_pointer_playback()
513 if (ptr3 != ptr4) ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel); in snd_p16v_pcm_pointer_playback()
515 ptr2+= (ptr4 >> 3) * runtime->period_size; in snd_p16v_pcm_pointer_playback()
517 if (ptr >= runtime->buffer_size) in snd_p16v_pcm_pointer_playback()
518 ptr -= runtime->buffer_size; in snd_p16v_pcm_pointer_playback()
528 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_pointer_capture()
529 struct snd_emu10k1_pcm *epcm = runtime->private_data; in snd_p16v_pcm_pointer_capture()
531 int channel = 0; in snd_p16v_pcm_pointer_capture() local
533 if (!epcm->running) in snd_p16v_pcm_pointer_capture()
536 ptr1 = snd_emu10k1_ptr20_read(emu, CAPTURE_POINTER, channel); in snd_p16v_pcm_pointer_capture()
539 if (ptr >= runtime->buffer_size) { in snd_p16v_pcm_pointer_capture()
540 ptr -= runtime->buffer_size; in snd_p16v_pcm_pointer_capture()
541 dev_warn(emu->card->dev, "buffer capture limited!\n"); in snd_p16v_pcm_pointer_capture()
544 dev_dbg(emu->card->dev, "ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, " in snd_p16v_pcm_pointer_capture()
546 ptr1, ptr2, ptr, (int)runtime->buffer_size, in snd_p16v_pcm_pointer_capture()
547 (int)runtime->period_size, (int)runtime->frame_bits, in snd_p16v_pcm_pointer_capture()
548 (int)runtime->rate); in snd_p16v_pcm_pointer_capture()
577 /* dev_dbg(emu->card->dev, "snd_p16v_pcm called. device=%d\n", device); */ in snd_p16v_pcm()
578 emu->p16v_device_offset = device; in snd_p16v_pcm()
580 err = snd_pcm_new(emu->card, "p16v", device, 1, capture, &pcm); in snd_p16v_pcm()
584 pcm->private_data = emu; in snd_p16v_pcm()
585 // Single playback 8 channel device. in snd_p16v_pcm()
586 // Single capture 2 channel device. in snd_p16v_pcm()
590 pcm->info_flags = 0; in snd_p16v_pcm()
591 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; in snd_p16v_pcm()
592 strcpy(pcm->name, "p16v"); in snd_p16v_pcm()
593 emu->pcm_p16v = pcm; in snd_p16v_pcm()
595 for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; in snd_p16v_pcm()
597 substream = substream->next) { in snd_p16v_pcm()
599 &emu->pci->dev, in snd_p16v_pcm()
600 (65536 - 64) * 8, in snd_p16v_pcm()
601 (65536 - 64) * 8); in snd_p16v_pcm()
603 dev_dbg(emu->card->dev, in snd_p16v_pcm()
608 for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; in snd_p16v_pcm()
610 substream = substream->next) { in snd_p16v_pcm()
612 &emu->pci->dev, in snd_p16v_pcm()
613 65536 - 64, 65536 - 64); in snd_p16v_pcm()
615 dev_dbg(emu->card->dev, in snd_p16v_pcm()
626 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_p16v_volume_info()
627 uinfo->count = 2; in snd_p16v_volume_info()
628 uinfo->value.integer.min = 0; in snd_p16v_volume_info()
629 uinfo->value.integer.max = 255; in snd_p16v_volume_info()
637 int high_low = (kcontrol->private_value >> 8) & 0xff; in snd_p16v_volume_get()
638 int reg = kcontrol->private_value & 0xff; in snd_p16v_volume_get()
643 ucontrol->value.integer.value[0] = 0xff - ((value >> 24) & 0xff); /* Left */ in snd_p16v_volume_get()
644 ucontrol->value.integer.value[1] = 0xff - ((value >> 16) & 0xff); /* Right */ in snd_p16v_volume_get()
646 ucontrol->value.integer.value[0] = 0xff - ((value >> 8) & 0xff); /* Left */ in snd_p16v_volume_get()
647 ucontrol->value.integer.value[1] = 0xff - ((value >> 0) & 0xff); /* Right */ in snd_p16v_volume_get()
656 int high_low = (kcontrol->private_value >> 8) & 0xff; in snd_p16v_volume_put()
657 int reg = kcontrol->private_value & 0xff; in snd_p16v_volume_put()
663 value |= ((0xff - ucontrol->value.integer.value[0]) << 24) | in snd_p16v_volume_put()
664 ((0xff - ucontrol->value.integer.value[1]) << 16); in snd_p16v_volume_put()
667 value |= ((0xff - ucontrol->value.integer.value[0]) << 8) | in snd_p16v_volume_put()
668 ((0xff - ucontrol->value.integer.value[1]) ); in snd_p16v_volume_put()
680 static const char * const texts[8] = { in snd_p16v_capture_source_info()
685 return snd_ctl_enum_info(uinfo, 1, 8, texts); in snd_p16v_capture_source_info()
693 ucontrol->value.enumerated.item[0] = emu->p16v_capture_source; in snd_p16v_capture_source_get()
706 val = ucontrol->value.enumerated.item[0] ; in snd_p16v_capture_source_put()
708 return -EINVAL; in snd_p16v_capture_source_put()
709 change = (emu->p16v_capture_source != val); in snd_p16v_capture_source_put()
711 emu->p16v_capture_source = val; in snd_p16v_capture_source_put()
732 ucontrol->value.enumerated.item[0] = emu->p16v_capture_channel; in snd_p16v_capture_channel_get()
744 val = ucontrol->value.enumerated.item[0] ; in snd_p16v_capture_channel_put()
746 return -EINVAL; in snd_p16v_capture_channel_put()
747 change = (emu->p16v_capture_channel != val); in snd_p16v_capture_channel_put()
749 emu->p16v_capture_channel = val; in snd_p16v_capture_channel_put()
755 static const DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1);
765 .private_value = ((xreg) | ((xhl) << 8)) \
786 .name = "HD channel Capture",
797 struct snd_card *card = emu->card; in snd_p16v_mixer()
809 #define NUM_CHS 1 /* up to 4, but only first channel is used */
813 emu->p16v_saved = vmalloc(array_size(NUM_CHS * 4, 0x80)); in snd_p16v_alloc_pm_buffer()
814 if (! emu->p16v_saved) in snd_p16v_alloc_pm_buffer()
815 return -ENOMEM; in snd_p16v_alloc_pm_buffer()
821 vfree(emu->p16v_saved); in snd_p16v_free_pm_buffer()
829 val = emu->p16v_saved; in snd_p16v_suspend()
840 val = emu->p16v_saved; in snd_p16v_resume()