Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257771
b: refs/heads/master
c: 9e7717c
h: refs/heads/master
i:
  257769: 03e259c
  257767: 88d6d8e
v: v3
  • Loading branch information
Takashi Iwai committed Jul 12, 2011
1 parent 3994364 commit 45a538e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 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: b2f934a0dffd4153e9447ee9e0090e357a3d8b3b
refs/heads/master: 9e7717c9eb9da8dba98f36dd3c390a45375499b3
20 changes: 14 additions & 6 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,6 @@ int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid,
}
EXPORT_SYMBOL_HDA(snd_hda_get_sub_nodes);

static int _hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
hda_nid_t *conn_list, int max_conns);

/* look up the cached results */
static hda_nid_t *lookup_conn_list(struct snd_array *array, hda_nid_t nid)
{
Expand Down Expand Up @@ -357,7 +354,7 @@ int snd_hda_get_conn_list(struct hda_codec *codec, hda_nid_t nid,
return -EINVAL;

/* read the connection and add to the cache */
len = _hda_get_connections(codec, nid, list, HDA_MAX_CONNECTIONS);
len = snd_hda_get_raw_connections(codec, nid, list, HDA_MAX_CONNECTIONS);
if (len < 0)
return len;
err = snd_hda_override_conn_list(codec, nid, len, list);
Expand Down Expand Up @@ -399,8 +396,19 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
}
EXPORT_SYMBOL_HDA(snd_hda_get_connections);

static int _hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
hda_nid_t *conn_list, int max_conns)
/**
* snd_hda_get_raw_connections - copy connection list without cache
* @codec: the HDA codec
* @nid: NID to parse
* @conn_list: connection list array
* @max_conns: max. number of connections to store
*
* Like snd_hda_get_connections(), copy the connection list but without
* checking through the connection-list cache.
* Currently called only from hda_proc.c, so not exported.
*/
int snd_hda_get_raw_connections(struct hda_codec *codec, hda_nid_t nid,
hda_nid_t *conn_list, int max_conns)
{
unsigned int parm;
int i, conn_len, conns;
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,8 @@ int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid,
hda_nid_t *start_id);
int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
hda_nid_t *conn_list, int max_conns);
int snd_hda_get_raw_connections(struct hda_codec *codec, hda_nid_t nid,
hda_nid_t *conn_list, int max_conns);
int snd_hda_get_conn_list(struct hda_codec *codec, hda_nid_t nid,
const hda_nid_t **listp);
int snd_hda_override_conn_list(struct hda_codec *codec, hda_nid_t nid, int nums,
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/hda/hda_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ static void print_codec_info(struct snd_info_entry *entry,
wid_caps |= AC_WCAP_CONN_LIST;

if (wid_caps & AC_WCAP_CONN_LIST)
conn_len = snd_hda_get_connections(codec, nid, conn,
conn_len = snd_hda_get_raw_connections(codec, nid, conn,
HDA_MAX_CONNECTIONS);

if (wid_caps & AC_WCAP_IN_AMP) {
Expand Down

0 comments on commit 45a538e

Please sign in to comment.