Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34903
b: refs/heads/master
c: a0aef8e
h: refs/heads/master
i:
  34901: f00e5a6
  34899: bd89ce5
  34895: ee2d1b0
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Sep 23, 2006
1 parent 8a3af6a commit 7c446bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 666c70ffd1c4be795de988f26a8ab13524d4ed47
refs/heads/master: a0aef8edfc9d6d682dba557fe42599297cbc329a
10 changes: 10 additions & 0 deletions trunk/sound/pci/trident/trident_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <sound/core.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/tlv.h>
#include <sound/trident.h>
#include <sound/asoundef.h>

Expand Down Expand Up @@ -2627,6 +2628,8 @@ static int snd_trident_vol_control_get(struct snd_kcontrol *kcontrol,
return 0;
}

static DECLARE_TLV_DB_SCALE(db_scale_gvol, -6375, 25, 0);

static int snd_trident_vol_control_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
Expand All @@ -2653,6 +2656,7 @@ static struct snd_kcontrol_new snd_trident_vol_music_control __devinitdata =
.get = snd_trident_vol_control_get,
.put = snd_trident_vol_control_put,
.private_value = 16,
.tlv = { .p = db_scale_gvol },
};

static struct snd_kcontrol_new snd_trident_vol_wave_control __devinitdata =
Expand All @@ -2663,6 +2667,7 @@ static struct snd_kcontrol_new snd_trident_vol_wave_control __devinitdata =
.get = snd_trident_vol_control_get,
.put = snd_trident_vol_control_put,
.private_value = 0,
.tlv = { .p = db_scale_gvol },
};

/*---------------------------------------------------------------------------
Expand Down Expand Up @@ -2730,6 +2735,7 @@ static struct snd_kcontrol_new snd_trident_pcm_vol_control __devinitdata =
.info = snd_trident_pcm_vol_control_info,
.get = snd_trident_pcm_vol_control_get,
.put = snd_trident_pcm_vol_control_put,
/* FIXME: no tlv yet */
};

/*---------------------------------------------------------------------------
Expand Down Expand Up @@ -2839,6 +2845,8 @@ static int snd_trident_pcm_rvol_control_put(struct snd_kcontrol *kcontrol,
return change;
}

static DECLARE_TLV_DB_SCALE(db_scale_crvol, -3175, 25, 1);

static struct snd_kcontrol_new snd_trident_pcm_rvol_control __devinitdata =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
Expand All @@ -2848,6 +2856,7 @@ static struct snd_kcontrol_new snd_trident_pcm_rvol_control __devinitdata =
.info = snd_trident_pcm_rvol_control_info,
.get = snd_trident_pcm_rvol_control_get,
.put = snd_trident_pcm_rvol_control_put,
.tlv = { .p = db_scale_crvol },
};

/*---------------------------------------------------------------------------
Expand Down Expand Up @@ -2903,6 +2912,7 @@ static struct snd_kcontrol_new snd_trident_pcm_cvol_control __devinitdata =
.info = snd_trident_pcm_cvol_control_info,
.get = snd_trident_pcm_cvol_control_get,
.put = snd_trident_pcm_cvol_control_put,
.tlv = { .p = db_scale_crvol },
};

static void snd_trident_notify_pcm_change1(struct snd_card *card,
Expand Down

0 comments on commit 7c446bc

Please sign in to comment.