Lines Matching +full:0 +full:x0fffff

25 #define PCXHR_LINE_CAPTURE_LEVEL_MIN   0	/* -112.0 dB */
27 #define PCXHR_LINE_CAPTURE_ZERO_LEVEL 224 /* 0.0 dB ( 0 dBu -> 0 dBFS ) */
29 #define PCXHR_LINE_PLAYBACK_LEVEL_MIN 0 /* -104.0 dB */
31 #define PCXHR_LINE_PLAYBACK_ZERO_LEVEL 104 /* 0.0 dB ( 0 dBFS -> 0 dBu ) */
47 rmh.cmd[0] |= IO_NUM_REG_IN_ANA_LEVEL; in pcxhr_update_analog_audio_level()
50 rmh.cmd[0] |= IO_NUM_REG_OUT_ANA_LEVEL; in pcxhr_update_analog_audio_level()
61 if (err < 0) { in pcxhr_update_analog_audio_level()
68 return 0; in pcxhr_update_analog_audio_level()
81 if (kcontrol->private_value == 0) { /* playback */ in pcxhr_analog_vol_info()
106 return 0; in pcxhr_analog_vol_info()
114 if (kcontrol->private_value == 0) { /* playback */ in pcxhr_analog_vol_get()
115 ucontrol->value.integer.value[0] = chip->analog_playback_volume[0]; in pcxhr_analog_vol_get()
118 ucontrol->value.integer.value[0] = chip->analog_capture_volume[0]; in pcxhr_analog_vol_get()
122 return 0; in pcxhr_analog_vol_get()
129 int changed = 0; in pcxhr_analog_vol_put()
133 is_capture = (kcontrol->private_value != 0); in pcxhr_analog_vol_put()
134 for (i = 0; i < 2; i++) { in pcxhr_analog_vol_put()
196 ucontrol->value.integer.value[0] = chip->analog_playback_active[0]; in pcxhr_audio_sw_get()
199 return 0; in pcxhr_audio_sw_get()
206 int i, changed = 0; in pcxhr_audio_sw_put()
208 for(i = 0; i < 2; i++) { in pcxhr_audio_sw_put()
216 hr222_update_analog_audio_level(chip, 0, i); in pcxhr_audio_sw_put()
218 pcxhr_update_analog_audio_level(chip, 0, i); in pcxhr_audio_sw_put()
234 #define PCXHR_DIGITAL_LEVEL_MIN 0x000 /* -110 dB */
235 #define PCXHR_DIGITAL_LEVEL_MAX 0x1ff /* +18 dB */
236 #define PCXHR_DIGITAL_ZERO_LEVEL 0x1b7 /* 0 dB */
240 #define MORE_THAN_ONE_STREAM_LEVEL 0x000001
241 #define VALID_STREAM_PAN_LEVEL_MASK 0x800000
242 #define VALID_STREAM_LEVEL_MASK 0x400000
243 #define VALID_STREAM_LEVEL_1_MASK 0x200000
244 #define VALID_STREAM_LEVEL_2_MASK 0x100000
253 if (chip->digital_playback_active[idx][0]) in pcxhr_update_playback_stream_level()
254 left = chip->digital_playback_volume[idx][0]; in pcxhr_update_playback_stream_level()
264 pcxhr_set_pipe_cmd_params(&rmh, 0, pipe->first_audio, 0, 1<<idx); in pcxhr_update_playback_stream_level()
266 rmh.cmd[0] |= MORE_THAN_ONE_STREAM_LEVEL; in pcxhr_update_playback_stream_level()
274 if (err < 0) { in pcxhr_update_playback_stream_level()
279 return 0; in pcxhr_update_playback_stream_level()
282 #define AUDIO_IO_HAS_MUTE_LEVEL 0x400000
283 #define AUDIO_IO_HAS_MUTE_MONITOR_1 0x200000
284 #define VALID_AUDIO_IO_DIGITAL_LEVEL 0x000001
285 #define VALID_AUDIO_IO_MONITOR_LEVEL 0x000002
286 #define VALID_AUDIO_IO_MUTE_LEVEL 0x000004
287 #define VALID_AUDIO_IO_MUTE_MONITOR_1 0x000008
297 pipe = &chip->capture_pipe[0]; in pcxhr_update_audio_pipe_level()
303 pcxhr_set_pipe_cmd_params(&rmh, capture, 0, 0, in pcxhr_update_audio_pipe_level()
308 rmh.cmd[0] |= VALID_AUDIO_IO_DIGITAL_LEVEL; in pcxhr_update_audio_pipe_level()
313 rmh.cmd[0] |= VALID_AUDIO_IO_MONITOR_LEVEL | in pcxhr_update_audio_pipe_level()
319 if (chip->monitoring_active[channel] == 0) in pcxhr_update_audio_pipe_level()
325 if (err < 0) { in pcxhr_update_audio_pipe_level()
331 return 0; in pcxhr_update_audio_pipe_level()
343 return 0; in pcxhr_digital_vol_info()
360 ucontrol->value.integer.value[0] = stored_volume[0]; in pcxhr_pcm_vol_get()
363 return 0; in pcxhr_pcm_vol_get()
371 int changed = 0; in pcxhr_pcm_vol_put()
381 for (i = 0; i < 2; i++) { in pcxhr_pcm_vol_put()
420 ucontrol->value.integer.value[0] = chip->digital_playback_active[idx][0]; in pcxhr_pcm_sw_get()
423 return 0; in pcxhr_pcm_sw_get()
430 int changed = 0; in pcxhr_pcm_sw_put()
436 for (i = 0; i < 2; i++) { in pcxhr_pcm_sw_put()
469 ucontrol->value.integer.value[0] = chip->monitoring_volume[0]; in pcxhr_monitor_vol_get()
472 return 0; in pcxhr_monitor_vol_get()
479 int changed = 0; in pcxhr_monitor_vol_put()
483 for (i = 0; i < 2; i++) { in pcxhr_monitor_vol_put()
491 pcxhr_update_audio_pipe_level(chip, 0, i); in pcxhr_monitor_vol_put()
519 ucontrol->value.integer.value[0] = chip->monitoring_active[0]; in pcxhr_monitor_sw_get()
522 return 0; in pcxhr_monitor_sw_get()
529 int changed = 0; in pcxhr_monitor_sw_put()
533 for (i = 0; i < 2; i++) { in pcxhr_monitor_sw_put()
538 changed |= (1<<i); /* mask 0x01 and 0x02 */ in pcxhr_monitor_sw_put()
541 if (changed & 0x01) in pcxhr_monitor_sw_put()
543 pcxhr_update_audio_pipe_level(chip, 0, 0); in pcxhr_monitor_sw_put()
544 if (changed & 0x02) in pcxhr_monitor_sw_put()
546 pcxhr_update_audio_pipe_level(chip, 0, 1); in pcxhr_monitor_sw_put()
549 return (changed != 0); in pcxhr_monitor_sw_put()
565 #define PCXHR_SOURCE_AUDIO01_UER 0x000100
566 #define PCXHR_SOURCE_AUDIO01_SYNC 0x000200
567 #define PCXHR_SOURCE_AUDIO23_UER 0x000400
568 #define PCXHR_SOURCE_AUDIO45_UER 0x001000
569 #define PCXHR_SOURCE_AUDIO67_UER 0x040000
579 case 0 : mask = PCXHR_SOURCE_AUDIO01_UER; codec = CS8420_01_CS; break; in pcxhr_set_audio_source()
585 if (chip->audio_capture_source != 0) { in pcxhr_set_audio_source()
588 reg = 0; /* audio source from analog plug */ in pcxhr_set_audio_source()
595 rmh.cmd[0] |= (1 << chip->chip_idx); in pcxhr_set_audio_source()
602 unsigned int src_config = 0xC0; in pcxhr_set_audio_source()
604 for (i = 0; (i < 4) && (i < chip->mgr->capture_chips); i++) { in pcxhr_set_audio_source()
611 rmh.cmd[0] |= IO_NUM_REG_CONFIG_SRC; in pcxhr_set_audio_source()
615 int use_src = 0; in pcxhr_set_audio_source()
621 rmh.cmd[0] |= IO_NUM_UER_CHIP_REG; in pcxhr_set_audio_source()
624 (use_src ? 0x41 : 0x54)); in pcxhr_set_audio_source()
629 (use_src ? 0x41 : 0x49)); in pcxhr_set_audio_source()
657 ucontrol->value.enumerated.item[0] = chip->audio_capture_source; in pcxhr_audio_src_get()
658 return 0; in pcxhr_audio_src_get()
665 int ret = 0; in pcxhr_audio_src_put()
672 if (ucontrol->value.enumerated.item[0] >= i) in pcxhr_audio_src_put()
675 if (chip->audio_capture_source != ucontrol->value.enumerated.item[0]) { in pcxhr_audio_src_put()
676 chip->audio_capture_source = ucontrol->value.enumerated.item[0]; in pcxhr_audio_src_put()
699 * PCXHR_CLOCK_TYPE_INTERNAL = 0,
746 ucontrol->value.enumerated.item[0] = mgr->use_clock_type; in pcxhr_clock_type_get()
747 return 0; in pcxhr_clock_type_get()
754 int rate, ret = 0; in pcxhr_clock_type_put()
761 if (ucontrol->value.enumerated.item[0] >= clock_items) in pcxhr_clock_type_put()
764 if (mgr->use_clock_type != ucontrol->value.enumerated.item[0]) { in pcxhr_clock_type_put()
766 mgr->use_clock_type = ucontrol->value.enumerated.item[0]; in pcxhr_clock_type_put()
767 rate = 0; in pcxhr_clock_type_put()
806 uinfo->value.integer.min = 0; /* clock not present */ in pcxhr_clock_rate_info()
808 return 0; in pcxhr_clock_rate_info()
818 for(i = 0; i < 3 + mgr->capture_chips; i++) { in pcxhr_clock_rate_get()
829 return 0; in pcxhr_clock_rate_get()
848 return 0; in pcxhr_iec958_info()
859 rmh.cmd[0] |= IO_NUM_UER_CHIP_REG; in pcxhr_iec958_capture_byte()
862 case 0: rmh.cmd[1] = CS8420_01_CS; break; in pcxhr_iec958_capture_byte()
870 case 0: rmh.cmd[2] = CS8416_CSB0; break; in pcxhr_iec958_capture_byte()
880 case 0: rmh.cmd[2] = CS8420_CSB0; break; in pcxhr_iec958_capture_byte()
889 rmh.cmd[1] &= 0x0fffff; in pcxhr_iec958_capture_byte()
900 temp = 0; in pcxhr_iec958_capture_byte()
902 for (i = 0; i < 8; i++) { in pcxhr_iec958_capture_byte()
908 dev_dbg(chip->card->dev, "read iec958 AES %d byte %d = 0x%x\n", in pcxhr_iec958_capture_byte()
911 return 0; in pcxhr_iec958_capture_byte()
922 for(i = 0; i < 5; i++) { in pcxhr_iec958_get()
923 if (kcontrol->private_value == 0) /* playback */ in pcxhr_iec958_get()
938 return 0; in pcxhr_iec958_get()
945 for (i = 0; i < 5; i++) in pcxhr_iec958_mask_get()
946 ucontrol->value.iec958.status[i] = 0xff; in pcxhr_iec958_mask_get()
947 return 0; in pcxhr_iec958_mask_get()
958 for (i = 0; i < 8; i++) { in pcxhr_iec958_update_byte()
959 if ((old_bits & 0x01) != (new_bits & 0x01)) { in pcxhr_iec958_update_byte()
960 cmd = chip->chip_idx & 0x03; /* chip index 0..3 */ in pcxhr_iec958_update_byte()
965 cmd |= (new_bits & 0x01) << 23; /* add bit value */ in pcxhr_iec958_update_byte()
967 rmh.cmd[0] |= IO_NUM_REG_CUER; in pcxhr_iec958_update_byte()
981 return 0; in pcxhr_iec958_update_byte()
988 int i, changed = 0; in pcxhr_iec958_put()
992 for (i = 0; i < 5; i++) { in pcxhr_iec958_put()
1020 .private_value = 0 /* playback */
1043 for (i = 0; i < 2; i++) { in pcxhr_init_audio_levels()
1046 /* at boot time the digital volumes are unmuted 0dB */ in pcxhr_init_audio_levels()
1047 for (j = 0; j < PCXHR_PLAYBACK_STREAMS; j++) { in pcxhr_init_audio_levels()
1055 chip->aes_bits[0] = (IEC958_AES0_PROFESSIONAL | in pcxhr_init_audio_levels()
1068 pcxhr_update_analog_audio_level(chip, 0, i); in pcxhr_init_audio_levels()
1073 hr222_update_analog_audio_level(chip, 0, i); in pcxhr_init_audio_levels()
1076 /* at boot time the digital volumes are unmuted 0dB */ in pcxhr_init_audio_levels()
1110 for (i = 0; i < mgr->num_cards; i++) { in pcxhr_create_mixer()
1118 temp.private_value = 0; /* playback */ in pcxhr_create_mixer()
1125 if (err < 0) in pcxhr_create_mixer()
1132 if (err < 0) in pcxhr_create_mixer()
1138 temp.private_value = 0; /* playback */ in pcxhr_create_mixer()
1141 if (err < 0) in pcxhr_create_mixer()
1146 if (err < 0) in pcxhr_create_mixer()
1153 if (err < 0) in pcxhr_create_mixer()
1159 if (err < 0) in pcxhr_create_mixer()
1174 if (err < 0) in pcxhr_create_mixer()
1184 if (err < 0) in pcxhr_create_mixer()
1190 if (err < 0) in pcxhr_create_mixer()
1197 if (err < 0) in pcxhr_create_mixer()
1203 if (err < 0) in pcxhr_create_mixer()
1208 if (err < 0) in pcxhr_create_mixer()
1213 if (chip->nb_streams_capt > 0 && chip->nb_streams_play > 0) { in pcxhr_create_mixer()
1217 if (err < 0) in pcxhr_create_mixer()
1222 if (err < 0) in pcxhr_create_mixer()
1226 if (i == 0) { in pcxhr_create_mixer()
1230 if (err < 0) in pcxhr_create_mixer()
1237 if (err < 0) in pcxhr_create_mixer()
1245 return 0; in pcxhr_create_mixer()