Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270781
b: refs/heads/master
c: 30d86ba
h: refs/heads/master
i:
  270779: ea08264
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Oct 5, 2011
1 parent f329ec1 commit 186ab1f
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 08a1ed76f5cf94bef07cb370b079760553a87b4b
refs/heads/master: 30d86ba47f79d566fffe9ba577caf247d06a3796
17 changes: 15 additions & 2 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
*/
#define SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, xmax, xinvert) \
((unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .shift = shift_left, .rshift = shift_right, \
.max = xmax, .platform_max = xmax, .invert = xinvert})
{.reg = xreg, .rreg = xreg, .shift = shift_left, \
.rshift = shift_right, .max = xmax, .platform_max = xmax, \
.invert = xinvert})
#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \
SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert)
#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \
Expand Down Expand Up @@ -947,6 +948,18 @@ static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
INIT_LIST_HEAD(&card->dapm_list);
}

static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
{
if (mc->reg == mc->rreg && mc->shift == mc->rshift)
return 0;
/*
* mc->reg == mc->rreg && mc->shift != mc->rshift, or
* mc->reg != mc->rreg means that the control is
* stereo (bits in one register or in two registers)
*/
return 1;
}

int snd_soc_util_init(void);
void snd_soc_util_exit(void);

Expand Down

0 comments on commit 186ab1f

Please sign in to comment.