mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 17:46:31 +01:00
Fixes for PCM capture switches...
This commit is contained in:
parent
f9d81448d8
commit
66c3b06a5a
4 changed files with 17 additions and 17 deletions
|
@ -60,7 +60,7 @@ rawdata return L_RAWDATA;
|
|||
pcm return L_PCM;
|
||||
rawmidi return L_RAWMIDI;
|
||||
playback return L_PLAYBACK;
|
||||
record return L_RECORD;
|
||||
capture return L_CAPTURE;
|
||||
output return L_OUTPUT;
|
||||
input return L_INPUT;
|
||||
iec958ocs return L_IEC958OCS;
|
||||
|
|
|
@ -53,7 +53,7 @@ static void build_mixer_element(char *name, int index, int etype);
|
|||
static void build_control_switch(char *name);
|
||||
static void build_mixer_switch(char *name);
|
||||
static void build_pcm_playback_switch(char *name);
|
||||
static void build_pcm_record_switch(char *name);
|
||||
static void build_pcm_capture_switch(char *name);
|
||||
static void build_rawmidi_output_switch(char *name);
|
||||
static void build_rawmidi_input_switch(char *name);
|
||||
|
||||
|
@ -117,7 +117,7 @@ static unsigned short Xswitchiec958ocs1[16];
|
|||
%token L_DOUBLE1
|
||||
/* other keywords */
|
||||
%token L_SOUNDCARD L_MIXER L_ELEMENT L_SWITCH L_RAWDATA
|
||||
%token L_CONTROL L_PCM L_RAWMIDI L_PLAYBACK L_RECORD L_INPUT L_OUTPUT
|
||||
%token L_CONTROL L_PCM L_RAWMIDI L_PLAYBACK L_CAPTURE L_INPUT L_OUTPUT
|
||||
%token L_SWITCH1 L_SWITCH2 L_SWITCH3 L_VOLUME1 L_3D_EFFECT1 L_ACCU3
|
||||
%token L_MUX1 L_MUX2 L_TONE_CONTROL1
|
||||
%token L_IEC958OCS L_3D L_RESET L_USER L_VALID L_DATA L_PROTECT L_PRE2
|
||||
|
@ -288,7 +288,7 @@ pcms : pcm
|
|||
;
|
||||
|
||||
pcm : L_PLAYBACK '{' playbacks '}'
|
||||
| L_RECORD '{' records '}'
|
||||
| L_CAPTURE '{' captures '}'
|
||||
| error { yyerror("an unknown keyword in the pcm{} section"); }
|
||||
;
|
||||
|
||||
|
@ -301,13 +301,13 @@ playback : L_SWITCH '(' string { build_pcm_playback_switch($3); }
|
|||
| error { yyerror("an unknown keyword in the playback{} section"); }
|
||||
;
|
||||
|
||||
records : record
|
||||
| records record
|
||||
captures : capture
|
||||
| captures capture
|
||||
;
|
||||
|
||||
record : L_SWITCH '(' string { build_pcm_record_switch($3); }
|
||||
',' switches ')' { build_pcm_record_switch(NULL); }
|
||||
| error { yyerror("an unknown keyword in the record{} section"); }
|
||||
capture : L_SWITCH '(' string { build_pcm_capture_switch($3); }
|
||||
',' switches ')' { build_pcm_capture_switch(NULL); }
|
||||
| error { yyerror("an unknown keyword in the capture{} section"); }
|
||||
;
|
||||
|
||||
rawmidis : rawmidi
|
||||
|
@ -778,7 +778,7 @@ static void build_pcm_playback_switch(char *name)
|
|||
build_switch(&Xpcm->pswitches, name);
|
||||
}
|
||||
|
||||
static void build_pcm_record_switch(char *name)
|
||||
static void build_pcm_capture_switch(char *name)
|
||||
{
|
||||
build_switch(&Xpcm->rswitches, name);
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ int soundcard_setup_merge_switches(int cardno)
|
|||
soundcard_setup_merge_sw(mixer->switches, rmixer->switches, soundcard->no, mixer->no, "mixer");
|
||||
}
|
||||
for (rpcm = rsoundcard->pcms; rpcm; rpcm = rpcm->next) {
|
||||
for (pcm = rsoundcard->pcms; pcm; pcm = pcm->next) {
|
||||
for (pcm = soundcard->pcms; pcm; pcm = pcm->next) {
|
||||
if (!strncmp(pcm->info.name, rpcm->info.name, sizeof(pcm->info.name)))
|
||||
break;
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ int soundcard_setup_process_switches(int cardno)
|
|||
}
|
||||
}
|
||||
}
|
||||
if(ctlhandle) {
|
||||
if (ctlhandle) {
|
||||
snd_ctl_close(ctlhandle);
|
||||
ctlhandle = NULL;
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ int soundcard_setup_process_data(int cardno)
|
|||
mixhandle = NULL;
|
||||
}
|
||||
}
|
||||
if(ctlhandle) {
|
||||
if (ctlhandle) {
|
||||
snd_ctl_close(ctlhandle);
|
||||
ctlhandle = NULL;
|
||||
}
|
||||
|
|
|
@ -946,12 +946,12 @@ int soundcard_setup_write(const char *cfgfile, int cardno)
|
|||
continue;
|
||||
fprintf(out, " pcm(\"%s\") {\n", pcm->info.name);
|
||||
if (pcm->pswitches) {
|
||||
fprintf(out, " playback {");
|
||||
fprintf(out, " playback {\n");
|
||||
soundcard_setup_write_switches(out, " ", SND_INTERFACE_PCM, &pcm->pswitches);
|
||||
fprintf(out, " }\n");
|
||||
}
|
||||
if (pcm->rswitches) {
|
||||
fprintf(out, " capture {");
|
||||
fprintf(out, " capture {\n");
|
||||
soundcard_setup_write_switches(out, " ", SND_INTERFACE_PCM, &pcm->rswitches);
|
||||
fprintf(out, " }\n");
|
||||
}
|
||||
|
@ -962,12 +962,12 @@ int soundcard_setup_write(const char *cfgfile, int cardno)
|
|||
continue;
|
||||
fprintf(out, " rawmidi(\"%s\") {\n", rawmidi->info.name);
|
||||
if (rawmidi->oswitches) {
|
||||
fprintf(out, " output {");
|
||||
fprintf(out, " output {\n");
|
||||
soundcard_setup_write_switches(out, " ", SND_INTERFACE_RAWMIDI, &rawmidi->oswitches);
|
||||
fprintf(out, " }\n");
|
||||
}
|
||||
if (rawmidi->iswitches) {
|
||||
fprintf(out, " input {");
|
||||
fprintf(out, " input {\n");
|
||||
soundcard_setup_write_switches(out, " ", SND_INTERFACE_RAWMIDI, &rawmidi->iswitches);
|
||||
fprintf(out, " }\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue