Example #1
0
status_t
ice1712_list_mix_controls(ice1712 *card, multi_mix_control_info *mmci)
{
	int32 i, parentTab, parentTabColumn;
	multi_mix_control *mmc = mmci->controls;

	nb_control_created = 0;

	TRACE("count = %ld\n", mmci->control_count);

	//Cleaning
	memset(mmc, 0, mmci->control_count * sizeof(multi_mix_control));

	//Setup tab
	parentTab = create_group_control(&mmc, nb_control_created, CONTROL_IS_MASTER, S_SETUP, NULL);

	//General Settings
	parentTabColumn = create_group_control(&mmc, nb_control_created, parentTab, S_null, string_list[1]);
	for (i = 0; SettingsGeneral[i] != NULL; i++)
		create_combo_control(&mmc, SettingsGeneral[i], parentTabColumn, string_list[5 + i]);

	//Digital Settings
	parentTabColumn = create_group_control(&mmc, nb_control_created, parentTab, S_null, string_list[2]);
	for (i = 0; SettingsDigital[i] != NULL; i++)
		create_combo_control(&mmc, SettingsDigital[i], parentTabColumn, string_list[9 + i]);

	//Output Selection Settings
	parentTabColumn = create_group_control(&mmc, nb_control_created, parentTab, S_null, string_list[3]);
	for (i = 0; i < card->nb_DAC; i += 2)
		create_output_choice(card, &mmc, i / 2, parentTabColumn);

	if (card->spdif_config & NO_IN_YES_OUT)
		create_output_choice(card, &mmc, 4, parentTabColumn);

	//Internal Mixer Tab
	parentTab = create_group_control(&mmc, nb_control_created, CONTROL_IS_MASTER, S_null, string_list[4]);

	for (i = 0; i < card->nb_DAC; i += 2) {
		parentTabColumn = create_group_control(&mmc, nb_control_created, parentTab, S_null, string_list[(i / 2) + 18]);
		create_channel_control(&mmc, ICE1712_MULTI_CONTROL_VOLUME_PB + i, parentTabColumn, NULL);
	}

	if (card->spdif_config & YES_IN_NO_OUT) {
		parentTabColumn = create_group_control(&mmc, nb_control_created, parentTab, S_null, string_list[22]);
		create_channel_control(&mmc, ICE1712_MULTI_CONTROL_VOLUME_REC + SPDIF_LEFT, parentTabColumn, NULL);
	}
	
	for (i = 0; i < card->nb_ADC; i += 2) {
		parentTabColumn = create_group_control(&mmc, nb_control_created, parentTab, S_null, string_list[(i / 2) + 12]);
		create_channel_control(&mmc, ICE1712_MULTI_CONTROL_VOLUME_REC + i, parentTabColumn, NULL);
	}

	if (card->spdif_config & NO_IN_YES_OUT) {
		parentTabColumn = create_group_control(&mmc, nb_control_created, parentTab, S_null, string_list[16]);
		create_channel_control(&mmc, ICE1712_MULTI_CONTROL_VOLUME_PB + SPDIF_LEFT, parentTabColumn, NULL);
	}

	TRACE("Return %ld control(s)\n", nb_control_created);
	mmci->control_count = nb_control_created;

	return B_OK;
}
Example #2
0
status_t
ice1712_list_mix_controls(ice1712 *card, multi_mix_control_info *mmci)
{
	uint32 i, parentTab, parentTabColumn;
	multi_mix_control *mmc = mmci->controls;
	uint32 group = 0, combo = 0, channel = 0;

	nb_control_created = 0;

	TRACE_VV("count = %ld\n", mmci->control_count);

	//Cleaning
	memset(mmc, 0, mmci->control_count * sizeof(multi_mix_control));

	//Setup tab
	parentTab = create_group_control(&mmc, group++,
		CONTROL_IS_MASTER, S_SETUP, NULL);

	//General Settings
	parentTabColumn = create_group_control(&mmc, group++, parentTab,
		S_null, string_list[1]);
	for (i = 0; SettingsGeneral[i] != NULL; i++) {
		create_combo_control(&mmc, SettingsGeneral[i], parentTabColumn,
			combo++, string_list[5 + i]);
	}

	//Digital Settings
	parentTabColumn = create_group_control(&mmc, group++, parentTab,
		S_null, string_list[2]);
	for (i = 0; SettingsDigital[i] != NULL; i++) {
		create_combo_control(&mmc, SettingsDigital[i], parentTabColumn,
			combo++, string_list[8 + i]);
	}

	//Output Selection Settings
	parentTabColumn = create_group_control(&mmc, group++, parentTab,
		S_null, string_list[3]);
	for (i = 0; i < card->config.nb_DAC; i += 2) {
		create_output_choice(card, &mmc, i / 2, parentTabColumn);
	}

	if (card->config.spdif & SPDIF_OUT_PRESENT) {
		create_output_choice(card, &mmc, 4, parentTabColumn);
	}

	//Internal Mixer Tab
	//Output
	parentTab = create_group_control(&mmc, group++, CONTROL_IS_MASTER,
		S_null, string_list[4]);

	for (i = 0; i < card->config.nb_DAC; i += 2) {
		parentTabColumn = create_group_control(&mmc, group++, parentTab,
			S_null, string_list[(i / 2) + 11]);
		create_channel_control(&mmc, channel++, parentTabColumn, NULL);
	}

	if (card->config.spdif & SPDIF_OUT_PRESENT) {
		parentTabColumn = create_group_control(&mmc, group++, parentTab,
			S_null, string_list[15]);
		create_channel_control(&mmc, ICE1712_HARDWARE_VOLUME - 2,
			parentTabColumn, NULL);
	}

	//Input
	channel = ICE1712_HARDWARE_VOLUME;
	for (i = 0; i < card->config.nb_ADC; i += 2) {
		parentTabColumn = create_group_control(&mmc, group++, parentTab,
			 S_null, string_list[(i / 2) + 17]);
		create_channel_control(&mmc, channel++, parentTabColumn, NULL);
	}

	if (card->config.spdif & SPDIF_IN_PRESENT) {
		parentTabColumn = create_group_control(&mmc, group++, parentTab,
			S_null, string_list[21]);
		create_channel_control(&mmc, 2 * ICE1712_HARDWARE_VOLUME - 2,
			parentTabColumn, NULL);
	}

	TRACE_VV("Return %ld control(s)\n", nb_control_created);
	mmci->control_count = nb_control_created;

	return B_OK;
}