mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2026-03-09 05:33:49 -04:00
envy24control - Fix/clean up checks of DMX 6fire
Fix/clean up checks of DMX 6fire.
This commit is contained in:
parent
26247b5422
commit
547c373a47
2 changed files with 12 additions and 7 deletions
|
|
@ -165,6 +165,9 @@ extern GtkLabel *av_ipga_volume_label[];
|
||||||
extern GtkWidget *av_dac_sense_radio[][4];
|
extern GtkWidget *av_dac_sense_radio[][4];
|
||||||
extern GtkWidget *av_adc_sense_radio[][4];
|
extern GtkWidget *av_adc_sense_radio[][4];
|
||||||
|
|
||||||
|
/* flags */
|
||||||
|
extern int card_is_dmx6fire;
|
||||||
|
|
||||||
gint level_meters_configure_event(GtkWidget *widget, GdkEventConfigure *event);
|
gint level_meters_configure_event(GtkWidget *widget, GdkEventConfigure *event);
|
||||||
gint level_meters_expose_event(GtkWidget *widget, GdkEventExpose *event);
|
gint level_meters_expose_event(GtkWidget *widget, GdkEventExpose *event);
|
||||||
gint level_meters_timeout_callback(gpointer data);
|
gint level_meters_timeout_callback(gpointer data);
|
||||||
|
|
@ -243,3 +246,4 @@ void adc_sense_toggled(GtkWidget *togglebutton, gpointer data);
|
||||||
|
|
||||||
void control_input_callback(gpointer data, gint source, GdkInputCondition condition);
|
void control_input_callback(gpointer data, gint source, GdkInputCondition condition);
|
||||||
void mixer_input_callback(gpointer data, gint source, GdkInputCondition condition);
|
void mixer_input_callback(gpointer data, gint source, GdkInputCondition condition);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -608,13 +608,14 @@ void spdif_input_update(void)
|
||||||
int digoptical = FALSE;
|
int digoptical = FALSE;
|
||||||
int diginternal = FALSE;
|
int diginternal = FALSE;
|
||||||
|
|
||||||
if ((card_eeprom.subvendor != ICE1712_SUBDEVICE_DELTADIO2496) && (card_eeprom.subvendor != ICE1712_SUBDEVICE_DMX6FIRE))
|
if ((card_eeprom.subvendor != ICE1712_SUBDEVICE_DELTADIO2496) &&
|
||||||
|
! card_is_dmx6fire)
|
||||||
return;
|
return;
|
||||||
if ((err = snd_ctl_elem_read(ctl, spdif_input)) < 0)
|
if ((err = snd_ctl_elem_read(ctl, spdif_input)) < 0)
|
||||||
g_print("Unable to read S/PDIF input switch: %s\n", snd_strerror(err));
|
g_print("Unable to read S/PDIF input switch: %s\n", snd_strerror(err));
|
||||||
if (snd_ctl_elem_value_get_boolean(spdif_input, 0))
|
if (snd_ctl_elem_value_get_boolean(spdif_input, 0))
|
||||||
digoptical = TRUE;
|
digoptical = TRUE;
|
||||||
if (card_eeprom.subvendor = ICE1712_SUBDEVICE_DMX6FIRE) {
|
if (card_is_dmx6fire) {
|
||||||
if ((err = snd_ctl_elem_read(ctl, spdif_on_off)) < 0)
|
if ((err = snd_ctl_elem_read(ctl, spdif_on_off)) < 0)
|
||||||
g_print("Unable to read S/PDIF on/off switch: %s\n", snd_strerror(err));
|
g_print("Unable to read S/PDIF on/off switch: %s\n", snd_strerror(err));
|
||||||
if (!(snd_ctl_elem_value_get_boolean(spdif_on_off, 0)))
|
if (!(snd_ctl_elem_value_get_boolean(spdif_on_off, 0)))
|
||||||
|
|
@ -656,7 +657,7 @@ void analog_input_select_update(void)
|
||||||
{
|
{
|
||||||
int err, input_interface;
|
int err, input_interface;
|
||||||
|
|
||||||
if (card_eeprom.subvendor != ICE1712_SUBDEVICE_DMX6FIRE)
|
if (! card_is_dmx6fire)
|
||||||
return;
|
return;
|
||||||
if ((err = snd_ctl_elem_read(ctl, analog_input_select)) < 0)
|
if ((err = snd_ctl_elem_read(ctl, analog_input_select)) < 0)
|
||||||
g_print("Unable to read analog input switch: %s\n", snd_strerror(err));
|
g_print("Unable to read analog input switch: %s\n", snd_strerror(err));
|
||||||
|
|
@ -711,7 +712,7 @@ void phono_input_update(void)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (card_eeprom.subvendor != ICE1712_SUBDEVICE_DMX6FIRE)
|
if (! card_is_dmx6fire)
|
||||||
return;
|
return;
|
||||||
if ((err = snd_ctl_elem_read(ctl, phono_input)) < 0)
|
if ((err = snd_ctl_elem_read(ctl, phono_input)) < 0)
|
||||||
g_print("Unable to read phono input switch: %s\n", snd_strerror(err));
|
g_print("Unable to read phono input switch: %s\n", snd_strerror(err));
|
||||||
|
|
@ -773,12 +774,12 @@ void hardware_init(void)
|
||||||
snd_ctl_elem_value_set_interface(volume_rate, SND_CTL_ELEM_IFACE_MIXER);
|
snd_ctl_elem_value_set_interface(volume_rate, SND_CTL_ELEM_IFACE_MIXER);
|
||||||
snd_ctl_elem_value_set_name(volume_rate, "Multi Track Volume Rate");
|
snd_ctl_elem_value_set_name(volume_rate, "Multi Track Volume Rate");
|
||||||
|
|
||||||
if(card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE){
|
if (! card_is_dmx6fire) {
|
||||||
snd_ctl_elem_value_set_interface(spdif_input, SND_CTL_ELEM_IFACE_MIXER);
|
snd_ctl_elem_value_set_interface(spdif_input, SND_CTL_ELEM_IFACE_MIXER);
|
||||||
snd_ctl_elem_value_set_name(spdif_input, "Optical Digital Input Switch");
|
snd_ctl_elem_value_set_name(spdif_input, "Optical Digital Input Switch");
|
||||||
} else {
|
} else {
|
||||||
snd_ctl_elem_value_set_interface(spdif_input, SND_CTL_ELEM_IFACE_MIXER);
|
snd_ctl_elem_value_set_interface(spdif_input, SND_CTL_ELEM_IFACE_MIXER);
|
||||||
snd_ctl_elem_value_set_name(spdif_input, "IEC958 Input Optical");
|
snd_ctl_elem_value_set_name(spdif_input, "IEC958 Input Optical");
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_ctl_elem_value_set_interface(spdif_output, SND_CTL_ELEM_IFACE_PCM);
|
snd_ctl_elem_value_set_interface(spdif_output, SND_CTL_ELEM_IFACE_PCM);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue