summaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2016-07-16 09:24:32 -0400
committerTakashi Iwai <tiwai@suse.de>2016-07-17 04:03:06 -0400
commit275353bb684ecfeb42f7a353fead81d43a01c519 (patch)
treef304223fc972237adeada76439a876bfdd5b4c52 /sound/pci/echoaudio
parent41e8a5788b5a1e187a690877d83b0f485c8c4ccd (diff)
ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members
Currently, sound device drivers for PCI cards produced by Echo Audio support dimension parameter of element information. But the information has contradictions to the number of members of each element. I guess that this comes from the assumption that these sound cards are used only by 'echomixer' in userspace. But ideally, they should be used with usual ALSA control applications. This commit removes the contradiction. As a result, 'Monitor Mixer Volume' and 'VMixer Volume' elements are shown in usual ALSA control applications such as 'amixer' and 'alsamixer' in series. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/echoaudio')
-rw-r--r--sound/pci/echoaudio/echoaudio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 1cb85aeb0cea..3a8e8d5a5617 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -1272,11 +1272,11 @@ static int snd_echo_mixer_info(struct snd_kcontrol *kcontrol,
1272 1272
1273 chip = snd_kcontrol_chip(kcontrol); 1273 chip = snd_kcontrol_chip(kcontrol);
1274 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1274 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
1275 uinfo->count = 1;
1276 uinfo->value.integer.min = ECHOGAIN_MINOUT; 1275 uinfo->value.integer.min = ECHOGAIN_MINOUT;
1277 uinfo->value.integer.max = ECHOGAIN_MAXOUT; 1276 uinfo->value.integer.max = ECHOGAIN_MAXOUT;
1278 uinfo->dimen.d[0] = num_busses_out(chip); 1277 uinfo->dimen.d[0] = num_busses_out(chip);
1279 uinfo->dimen.d[1] = num_busses_in(chip); 1278 uinfo->dimen.d[1] = num_busses_in(chip);
1279 uinfo->count = uinfo->dimen.d[0] * uinfo->dimen.d[1];
1280 return 0; 1280 return 0;
1281} 1281}
1282 1282
@@ -1344,11 +1344,11 @@ static int snd_echo_vmixer_info(struct snd_kcontrol *kcontrol,
1344 1344
1345 chip = snd_kcontrol_chip(kcontrol); 1345 chip = snd_kcontrol_chip(kcontrol);
1346 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1346 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
1347 uinfo->count = 1;
1348 uinfo->value.integer.min = ECHOGAIN_MINOUT; 1347 uinfo->value.integer.min = ECHOGAIN_MINOUT;
1349 uinfo->value.integer.max = ECHOGAIN_MAXOUT; 1348 uinfo->value.integer.max = ECHOGAIN_MAXOUT;
1350 uinfo->dimen.d[0] = num_busses_out(chip); 1349 uinfo->dimen.d[0] = num_busses_out(chip);
1351 uinfo->dimen.d[1] = num_pipes_out(chip); 1350 uinfo->dimen.d[1] = num_pipes_out(chip);
1351 uinfo->count = uinfo->dimen.d[0] * uinfo->dimen.d[1];
1352 return 0; 1352 return 0;
1353} 1353}
1354 1354
@@ -1728,7 +1728,6 @@ static int snd_echo_vumeters_info(struct snd_kcontrol *kcontrol,
1728 struct snd_ctl_elem_info *uinfo) 1728 struct snd_ctl_elem_info *uinfo)
1729{ 1729{
1730 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1730 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
1731 uinfo->count = 96;
1732 uinfo->value.integer.min = ECHOGAIN_MINOUT; 1731 uinfo->value.integer.min = ECHOGAIN_MINOUT;
1733 uinfo->value.integer.max = 0; 1732 uinfo->value.integer.max = 0;
1734#ifdef ECHOCARD_HAS_VMIXER 1733#ifdef ECHOCARD_HAS_VMIXER
@@ -1738,6 +1737,7 @@ static int snd_echo_vumeters_info(struct snd_kcontrol *kcontrol,
1738#endif 1737#endif
1739 uinfo->dimen.d[1] = 16; /* 16 channels */ 1738 uinfo->dimen.d[1] = 16; /* 16 channels */
1740 uinfo->dimen.d[2] = 2; /* 0=level, 1=peak */ 1739 uinfo->dimen.d[2] = 2; /* 0=level, 1=peak */
1740 uinfo->count = uinfo->dimen.d[0] * uinfo->dimen.d[1] * uinfo->dimen.d[2];
1741 return 0; 1741 return 0;
1742} 1742}
1743 1743