Lines Matching refs:portc
376 struct wavnc_port_info *portc; in waveartist_open() local
383 portc = (struct wavnc_port_info *) audio_devs[dev]->portc; in waveartist_open()
386 if (portc->open_mode || (devc->open_mode & mode)) { in waveartist_open()
393 portc->open_mode = mode; in waveartist_open()
410 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_close() local
411 audio_devs[dev]->portc; in waveartist_close()
419 devc->open_mode &= ~portc->open_mode; in waveartist_close()
420 portc->open_mode = 0; in waveartist_close()
428 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_output_block() local
429 audio_devs[dev]->portc; in waveartist_output_block()
441 if (portc->audio_format & (AFMT_S16_LE | AFMT_S16_BE)) in waveartist_output_block()
444 if (portc->channels > 1) in waveartist_output_block()
475 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_start_input() local
476 audio_devs[dev]->portc; in waveartist_start_input()
486 if (portc->audio_format & (AFMT_S16_LE | AFMT_S16_BE)) /* 16 bit data */ in waveartist_start_input()
489 if (portc->channels > 1) in waveartist_start_input()
524 waveartist_get_speed(struct wavnc_port_info *portc) in waveartist_get_speed() argument
531 if (portc->speed == 8000) in waveartist_get_speed()
533 else if (portc->speed == 11025) in waveartist_get_speed()
535 else if (portc->speed == 22050) in waveartist_get_speed()
537 else if (portc->speed == 44100) in waveartist_get_speed()
543 speed = portc->speed << 16; in waveartist_get_speed()
552 waveartist_get_bits(struct wavnc_port_info *portc) in waveartist_get_bits() argument
556 if (portc->audio_format == AFMT_S16_LE) in waveartist_get_bits()
558 else if (portc->audio_format == AFMT_S8) in waveartist_get_bits()
572 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_prepare_for_input() local
573 audio_devs[dev]->portc; in waveartist_prepare_for_input()
579 speed = waveartist_get_speed(portc); in waveartist_prepare_for_input()
580 bits = waveartist_get_bits(portc); in waveartist_prepare_for_input()
586 "record format to %d\n", portc->audio_format); in waveartist_prepare_for_input()
588 if (waveartist_cmd2(devc, WACMD_INPUTCHANNELS, portc->channels)) in waveartist_prepare_for_input()
590 "to %d channels\n", portc->channels); in waveartist_prepare_for_input()
597 "speed to %dHz.\n", portc->speed); in waveartist_prepare_for_input()
605 "format to %d\n", portc->audio_format); in waveartist_prepare_for_input()
629 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_prepare_for_output() local
630 audio_devs[dev]->portc; in waveartist_prepare_for_output()
636 speed = waveartist_get_speed(portc); in waveartist_prepare_for_output()
637 bits = waveartist_get_bits(portc); in waveartist_prepare_for_output()
644 "speed to %dHz.\n", portc->speed); in waveartist_prepare_for_output()
646 if (waveartist_cmd2(devc, WACMD_OUTPUTCHANNELS, portc->channels)) in waveartist_prepare_for_output()
648 "to %d channels\n", portc->channels); in waveartist_prepare_for_output()
656 "format to %d\n", portc->audio_format); in waveartist_prepare_for_output()
674 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_halt() local
675 audio_devs[dev]->portc; in waveartist_halt()
678 if (portc->open_mode & OPEN_WRITE) in waveartist_halt()
681 if (portc->open_mode & OPEN_READ) in waveartist_halt()
746 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_trigger() local
747 audio_devs[dev]->portc; in waveartist_trigger()
763 if (portc->open_mode & OPEN_READ && in waveartist_trigger()
770 if (portc->open_mode & OPEN_WRITE && in waveartist_trigger()
783 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_set_speed() local
784 audio_devs[dev]->portc; in waveartist_set_speed()
787 return portc->speed; in waveartist_set_speed()
794 portc->speed = arg; in waveartist_set_speed()
795 return portc->speed; in waveartist_set_speed()
802 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_set_channels() local
803 audio_devs[dev]->portc; in waveartist_set_channels()
806 return portc->channels; in waveartist_set_channels()
808 portc->channels = arg; in waveartist_set_channels()
815 struct wavnc_port_info *portc = (struct wavnc_port_info *) in waveartist_set_bits() local
816 audio_devs[dev]->portc; in waveartist_set_bits()
819 return portc->audio_format; in waveartist_set_bits()
824 portc->audio_format = arg; in waveartist_set_bits()
1267 struct wavnc_port_info *portc; in waveartist_init() local
1285 portc = kzalloc(sizeof(struct wavnc_port_info), GFP_KERNEL); in waveartist_init()
1286 if (portc == NULL) in waveartist_init()
1297 audio_devs[my_dev]->portc = portc; in waveartist_init()
1346 kfree(portc); in waveartist_init()