Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120472
b: refs/heads/master
c: ae8cb4c
h: refs/heads/master
v: v3
  • Loading branch information
Wu Fengguang authored and Takashi Iwai committed Nov 19, 2008
1 parent d984b9a commit 8083c60
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 33 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: d39b4352f2356bde9d4dae8591d4c8022360922f
refs/heads/master: ae8cb4caa34af20311fcf5ef248afc54407aa9a8
56 changes: 24 additions & 32 deletions trunk/sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,22 +389,27 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld,
static void hdmi_show_short_audio_desc(struct cea_sad *a)
{
char buf[SND_PRINT_RATES_ADVISED_BUFSIZE];
char buf2[8 + SND_PRINT_BITS_ADVISED_BUFSIZE] = ", bits =";

printk(KERN_INFO "coding type: %s\n",
cea_audio_coding_type_names[a->format]);
printk(KERN_INFO "channels: %d\n", a->channels);
if (!a->format)
return;

snd_print_pcm_rates(a->rates, buf, sizeof(buf));
printk(KERN_INFO "sampling rates: %s\n", buf);

if (a->format == AUDIO_CODING_TYPE_LPCM)
printk(KERN_INFO "sample bits: 0x%x\n", a->sample_bits);

if (a->max_bitrate)
printk(KERN_INFO "max bitrate: %d\n", a->max_bitrate);

if (a->profile)
printk(KERN_INFO "profile: %d\n", a->profile);
snd_print_pcm_rates(a->sample_bits, buf2 + 8, sizeof(buf2 - 8));
else if (a->max_bitrate)
snprintf(buf2, sizeof(buf2),
", max bitrate = %d", a->max_bitrate);
else
buf2[0] = '\0';

printk(KERN_INFO "supports coding type %s:"
" channels = %d, rates =%s%s\n",
cea_audio_coding_type_names[a->format],
a->channels,
buf,
buf2);
}

void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen)
Expand All @@ -422,29 +427,16 @@ void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen)
void snd_hdmi_show_eld(struct hdmi_eld *e)
{
int i;
char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE];

printk(KERN_INFO "ELD buffer size is %d\n", e->eld_size);
printk(KERN_INFO "ELD baseline len is %d*4\n", e->baseline_len);
printk(KERN_INFO "vendor block len is %d\n",
e->eld_size - e->baseline_len * 4 - 4);
printk(KERN_INFO "ELD version is %s\n",
eld_versoin_names[e->eld_ver]);
printk(KERN_INFO "CEA EDID version is %s\n",
cea_edid_version_names[e->cea_edid_ver]);
printk(KERN_INFO "manufacture id is 0x%x\n", e->manufacture_id);
printk(KERN_INFO "product id is 0x%x\n", e->product_id);
printk(KERN_INFO "port id is 0x%llx\n", (long long)e->port_id);
printk(KERN_INFO "HDCP support is %d\n", e->support_hdcp);
printk(KERN_INFO "AI support is %d\n", e->support_ai);
printk(KERN_INFO "SAD count is %d\n", e->sad_count);
printk(KERN_INFO "audio sync delay is %x\n", e->aud_synch_delay);
printk(KERN_INFO "connection type is %s\n",
eld_connection_type_names[e->conn_type]);
printk(KERN_INFO "monitor name is %s\n", e->monitor_name);
printk(KERN_INFO "detected monitor %s at connection type %s\n",
e->monitor_name,
eld_connection_type_names[e->conn_type]);

snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf));
printk(KERN_INFO "speaker allocations: (0x%x)%s\n", e->spk_alloc, buf);
if (e->spk_alloc) {
char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE];
snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf));
printk(KERN_INFO "available speakers:%s\n", buf);
}

for (i = 0; i < e->sad_count; i++)
hdmi_show_short_audio_desc(e->sad + i);
Expand Down

0 comments on commit 8083c60

Please sign in to comment.