diff options
author | Wu Fengguang <wfg@linux.intel.com> | 2008-11-19 02:14:03 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-19 03:42:38 -0500 |
commit | ae8cb4caa34af20311fcf5ef248afc54407aa9a8 (patch) | |
tree | 326b6c77c92d6bee407e617ac72f0b70281f3b74 /sound/pci/hda/hda_eld.c | |
parent | d39b4352f2356bde9d4dae8591d4c8022360922f (diff) |
ALSA: hda: compact ELD output messages
Strip out some ELD printk messages that end user won't care,
and make the output compact.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r-- | sound/pci/hda/hda_eld.c | 56 |
1 files changed, 24 insertions, 32 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index 8e575bb56ff7..e848c30d9bf7 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -389,22 +389,27 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld, | |||
389 | static void hdmi_show_short_audio_desc(struct cea_sad *a) | 389 | static void hdmi_show_short_audio_desc(struct cea_sad *a) |
390 | { | 390 | { |
391 | char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; | 391 | char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; |
392 | char buf2[8 + SND_PRINT_BITS_ADVISED_BUFSIZE] = ", bits ="; | ||
392 | 393 | ||
393 | printk(KERN_INFO "coding type: %s\n", | 394 | if (!a->format) |
394 | cea_audio_coding_type_names[a->format]); | 395 | return; |
395 | printk(KERN_INFO "channels: %d\n", a->channels); | ||
396 | 396 | ||
397 | snd_print_pcm_rates(a->rates, buf, sizeof(buf)); | 397 | snd_print_pcm_rates(a->rates, buf, sizeof(buf)); |
398 | printk(KERN_INFO "sampling rates: %s\n", buf); | ||
399 | 398 | ||
400 | if (a->format == AUDIO_CODING_TYPE_LPCM) | 399 | if (a->format == AUDIO_CODING_TYPE_LPCM) |
401 | printk(KERN_INFO "sample bits: 0x%x\n", a->sample_bits); | 400 | snd_print_pcm_rates(a->sample_bits, buf2 + 8, sizeof(buf2 - 8)); |
402 | 401 | else if (a->max_bitrate) | |
403 | if (a->max_bitrate) | 402 | snprintf(buf2, sizeof(buf2), |
404 | printk(KERN_INFO "max bitrate: %d\n", a->max_bitrate); | 403 | ", max bitrate = %d", a->max_bitrate); |
405 | 404 | else | |
406 | if (a->profile) | 405 | buf2[0] = '\0'; |
407 | printk(KERN_INFO "profile: %d\n", a->profile); | 406 | |
407 | printk(KERN_INFO "supports coding type %s:" | ||
408 | " channels = %d, rates =%s%s\n", | ||
409 | cea_audio_coding_type_names[a->format], | ||
410 | a->channels, | ||
411 | buf, | ||
412 | buf2); | ||
408 | } | 413 | } |
409 | 414 | ||
410 | void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen) | 415 | void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen) |
@@ -422,29 +427,16 @@ void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen) | |||
422 | void snd_hdmi_show_eld(struct hdmi_eld *e) | 427 | void snd_hdmi_show_eld(struct hdmi_eld *e) |
423 | { | 428 | { |
424 | int i; | 429 | int i; |
425 | char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE]; | ||
426 | 430 | ||
427 | printk(KERN_INFO "ELD buffer size is %d\n", e->eld_size); | 431 | printk(KERN_INFO "detected monitor %s at connection type %s\n", |
428 | printk(KERN_INFO "ELD baseline len is %d*4\n", e->baseline_len); | 432 | e->monitor_name, |
429 | printk(KERN_INFO "vendor block len is %d\n", | 433 | eld_connection_type_names[e->conn_type]); |
430 | e->eld_size - e->baseline_len * 4 - 4); | ||
431 | printk(KERN_INFO "ELD version is %s\n", | ||
432 | eld_versoin_names[e->eld_ver]); | ||
433 | printk(KERN_INFO "CEA EDID version is %s\n", | ||
434 | cea_edid_version_names[e->cea_edid_ver]); | ||
435 | printk(KERN_INFO "manufacture id is 0x%x\n", e->manufacture_id); | ||
436 | printk(KERN_INFO "product id is 0x%x\n", e->product_id); | ||
437 | printk(KERN_INFO "port id is 0x%llx\n", (long long)e->port_id); | ||
438 | printk(KERN_INFO "HDCP support is %d\n", e->support_hdcp); | ||
439 | printk(KERN_INFO "AI support is %d\n", e->support_ai); | ||
440 | printk(KERN_INFO "SAD count is %d\n", e->sad_count); | ||
441 | printk(KERN_INFO "audio sync delay is %x\n", e->aud_synch_delay); | ||
442 | printk(KERN_INFO "connection type is %s\n", | ||
443 | eld_connection_type_names[e->conn_type]); | ||
444 | printk(KERN_INFO "monitor name is %s\n", e->monitor_name); | ||
445 | 434 | ||
446 | snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf)); | 435 | if (e->spk_alloc) { |
447 | printk(KERN_INFO "speaker allocations: (0x%x)%s\n", e->spk_alloc, buf); | 436 | char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE]; |
437 | snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf)); | ||
438 | printk(KERN_INFO "available speakers:%s\n", buf); | ||
439 | } | ||
448 | 440 | ||
449 | for (i = 0; i < e->sad_count; i++) | 441 | for (i = 0; i < e->sad_count; i++) |
450 | hdmi_show_short_audio_desc(e->sad + i); | 442 | hdmi_show_short_audio_desc(e->sad + i); |