Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170319
b: refs/heads/master
c: e330323
h: refs/heads/master
i:
  170317: 553b409
  170315: e3b4ceb
  170311: d095f37
  170303: c560fec
v: v3
  • Loading branch information
Jaroslav Kysela authored and Takashi Iwai committed Nov 10, 2009
1 parent 1ede44e commit c4f45d8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 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: fb8d1a344dbe963f16249d07eee8415e93f9f3c2
refs/heads/master: e3303235209c0496b490e10ab131e72a9568c153
9 changes: 5 additions & 4 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2877,14 +2877,15 @@ static int set_pcm_default_values(struct hda_codec *codec,
return 0;
}

const char *snd_hda_pcm_type_name[HDA_PCM_NTYPES] = {
"Audio", "SPDIF", "HDMI", "Modem"
};

/*
* get the empty PCM device number to assign
*/
static int get_empty_pcm_device(struct hda_bus *bus, int type)
{
static const char *dev_name[HDA_PCM_NTYPES] = {
"Audio", "SPDIF", "HDMI", "Modem"
};
/* audio device indices; not linear to keep compatibility */
static int audio_idx[HDA_PCM_NTYPES][5] = {
[HDA_PCM_TYPE_AUDIO] = { 0, 2, 4, 5, -1 },
Expand All @@ -2903,7 +2904,7 @@ static int get_empty_pcm_device(struct hda_bus *bus, int type)
if (!test_and_set_bit(audio_idx[type][i], bus->pcm_dev_bits))
return audio_idx[type][i];

snd_printk(KERN_WARNING "Too many %s devices\n", dev_name[type]);
snd_printk(KERN_WARNING "Too many %s devices\n", snd_hda_pcm_type_name[type]);
return -EAGAIN;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ int snd_hda_codec_build_controls(struct hda_codec *codec);
/*
* PCM
*/
extern const char *snd_hda_pcm_type_name[];
int snd_hda_build_pcms(struct hda_bus *bus);
int snd_hda_codec_build_pcms(struct hda_codec *codec);
void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
Expand Down
16 changes: 15 additions & 1 deletion trunk/sound/pci/hda/hda_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,21 @@ static void print_audio_io(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid,
unsigned int wid_type)
{
int conv = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
int pcm, conv;
for (pcm = 0; pcm < codec->num_pcms; pcm++) {
int type;
struct hda_pcm *cpcm = &codec->pcm_info[pcm];
for (type = 0; type < 2; type++) {
if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL)
continue;
snd_iprintf(buffer, " Device: name=\"%s\", type=\"%s\", device=%i, substream=%i\n",
cpcm->name,
snd_hda_pcm_type_name[cpcm->pcm_type],
cpcm->pcm->device,
cpcm->pcm->streams[type].substream->number);
}
}
conv = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
snd_iprintf(buffer,
" Converter: stream=%d, channel=%d\n",
(conv & AC_CONV_STREAM) >> AC_CONV_STREAM_SHIFT,
Expand Down

0 comments on commit c4f45d8

Please sign in to comment.