Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260814
b: refs/heads/master
c: 4805608
h: refs/heads/master
v: v3
  • Loading branch information
Liam Girdwood authored and Mark Brown committed Jul 20, 2011
1 parent f48f2eb commit fb376fb
Show file tree
Hide file tree
Showing 2 changed files with 31 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: d7c3e9525ac8e898f1156a1f3a7c5038f6560186
refs/heads/master: 4805608ac1d1a60ca926ff81b1ebd3145f7adf78
30 changes: 30 additions & 0 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,36 @@ static inline struct snd_soc_dapm_widget *dapm_cnew_widget(
return kmemdup(_widget, sizeof(*_widget), GFP_KERNEL);
}

/* get snd_card from DAPM context */
static inline struct snd_card *dapm_get_snd_card(
struct snd_soc_dapm_context *dapm)
{
if (dapm->codec)
return dapm->codec->card->snd_card;
else if (dapm->platform)
return dapm->platform->card->snd_card;
else
BUG();

/* unreachable */
return NULL;
}

/* get soc_card from DAPM context */
static inline struct snd_soc_card *dapm_get_soc_card(
struct snd_soc_dapm_context *dapm)
{
if (dapm->codec)
return dapm->codec->card;
else if (dapm->platform)
return dapm->platform->card;
else
BUG();

/* unreachable */
return NULL;
}

static int soc_widget_read(struct snd_soc_dapm_widget *w, int reg)
{
if (w->codec)
Expand Down

0 comments on commit fb376fb

Please sign in to comment.