Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284107
b: refs/heads/master
c: d4b06d2
h: refs/heads/master
i:
  284105: 7500905
  284103: 5cded9e
v: v3
  • Loading branch information
Eliot Blennerhassett authored and Takashi Iwai committed Dec 22, 2011
1 parent 146f80b commit 0231dff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c382a5da5cda3e0d8a8f2e8809460285d0a7c1cb
refs/heads/master: d4b06d23ab1c5aefbb1377fb01939b555236f57f
16 changes: 14 additions & 2 deletions trunk/sound/pci/asihpi/asihpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,7 @@ static int snd_asihpi_volume_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
u32 h_control = kcontrol->private_value;
u32 count;
u16 err;
/* native gains are in millibels */
short min_gain_mB;
Expand All @@ -1424,8 +1425,12 @@ static int snd_asihpi_volume_info(struct snd_kcontrol *kcontrol,
step_gain_mB = VOL_STEP_mB;
}

err = hpi_meter_query_channels(h_control, &count);
if (err)
count = HPI_MAX_CHANNELS;

uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
uinfo->count = count;
uinfo->value.integer.min = min_gain_mB / VOL_STEP_mB;
uinfo->value.integer.max = max_gain_mB / VOL_STEP_mB;
uinfo->value.integer.step = step_gain_mB / VOL_STEP_mB;
Expand Down Expand Up @@ -2033,8 +2038,15 @@ static int __devinit snd_asihpi_tuner_add(struct snd_card_asihpi *asihpi,
static int snd_asihpi_meter_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
u32 h_control = kcontrol->private_value;
u32 count;
u16 err;
err = hpi_meter_query_channels(h_control, &count);
if (err)
count = HPI_MAX_CHANNELS;

uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = HPI_MAX_CHANNELS;
uinfo->count = count;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = 0x7FFFFFFF;
return 0;
Expand Down

0 comments on commit 0231dff

Please sign in to comment.