diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_lib.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 5 | ||||
-rw-r--r-- | sound/pci/hda/hda_proc.c | 7 |
4 files changed, 17 insertions, 5 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index bcf95d3ff5c7..e23e0e7ab26f 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -67,6 +67,8 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram | |||
67 | } else { | 67 | } else { |
68 | if (new_hw_ptr == ULONG_MAX) { /* initialization */ | 68 | if (new_hw_ptr == ULONG_MAX) { /* initialization */ |
69 | snd_pcm_sframes_t avail = snd_pcm_playback_hw_avail(runtime); | 69 | snd_pcm_sframes_t avail = snd_pcm_playback_hw_avail(runtime); |
70 | if (avail > runtime->buffer_size) | ||
71 | avail = runtime->buffer_size; | ||
70 | runtime->silence_filled = avail > 0 ? avail : 0; | 72 | runtime->silence_filled = avail > 0 ? avail : 0; |
71 | runtime->silence_start = (runtime->status->hw_ptr + | 73 | runtime->silence_start = (runtime->status->hw_ptr + |
72 | runtime->silence_filled) % | 74 | runtime->silence_filled) % |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index a3d638c8c1fd..6e0de65f1f3a 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -730,15 +730,17 @@ static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec) | |||
730 | total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); | 730 | total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); |
731 | for (i = 0; i < total_nodes; i++, nid++) { | 731 | for (i = 0; i < total_nodes; i++, nid++) { |
732 | function_id = snd_hda_param_read(codec, nid, | 732 | function_id = snd_hda_param_read(codec, nid, |
733 | AC_PAR_FUNCTION_TYPE) & 0xff; | 733 | AC_PAR_FUNCTION_TYPE); |
734 | switch (function_id) { | 734 | switch (function_id) { |
735 | case AC_GRP_AUDIO_FUNCTION: | 735 | case AC_GRP_AUDIO_FUNCTION: |
736 | codec->afg = nid; | 736 | codec->afg = nid; |
737 | codec->function_id = function_id; | 737 | codec->afg_function_id = function_id & 0xff; |
738 | codec->afg_unsol = (function_id >> 8) & 1; | ||
738 | break; | 739 | break; |
739 | case AC_GRP_MODEM_FUNCTION: | 740 | case AC_GRP_MODEM_FUNCTION: |
740 | codec->mfg = nid; | 741 | codec->mfg = nid; |
741 | codec->function_id = function_id; | 742 | codec->mfg_function_id = function_id & 0xff; |
743 | codec->mfg_unsol = (function_id >> 8) & 1; | ||
742 | break; | 744 | break; |
743 | default: | 745 | default: |
744 | break; | 746 | break; |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 49e939e7e5cd..f96e909f549c 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -760,7 +760,10 @@ struct hda_codec { | |||
760 | hda_nid_t mfg; /* MFG node id */ | 760 | hda_nid_t mfg; /* MFG node id */ |
761 | 761 | ||
762 | /* ids */ | 762 | /* ids */ |
763 | u32 function_id; | 763 | u8 afg_function_id; |
764 | u8 mfg_function_id; | ||
765 | u8 afg_unsol; | ||
766 | u8 mfg_unsol; | ||
764 | u32 vendor_id; | 767 | u32 vendor_id; |
765 | u32 subsystem_id; | 768 | u32 subsystem_id; |
766 | u32 revision_id; | 769 | u32 revision_id; |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index f97d35de66c4..f025200f2a62 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -557,7 +557,12 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
557 | else | 557 | else |
558 | snd_iprintf(buffer, "Not Set\n"); | 558 | snd_iprintf(buffer, "Not Set\n"); |
559 | snd_iprintf(buffer, "Address: %d\n", codec->addr); | 559 | snd_iprintf(buffer, "Address: %d\n", codec->addr); |
560 | snd_iprintf(buffer, "Function Id: 0x%x\n", codec->function_id); | 560 | if (codec->afg) |
561 | snd_iprintf(buffer, "AFG Function Id: 0x%x (unsol %u)\n", | ||
562 | codec->afg_function_id, codec->afg_unsol); | ||
563 | if (codec->mfg) | ||
564 | snd_iprintf(buffer, "MFG Function Id: 0x%x (unsol %u)\n", | ||
565 | codec->mfg_function_id, codec->mfg_unsol); | ||
561 | snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id); | 566 | snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id); |
562 | snd_iprintf(buffer, "Subsystem Id: 0x%08x\n", codec->subsystem_id); | 567 | snd_iprintf(buffer, "Subsystem Id: 0x%08x\n", codec->subsystem_id); |
563 | snd_iprintf(buffer, "Revision Id: 0x%x\n", codec->revision_id); | 568 | snd_iprintf(buffer, "Revision Id: 0x%x\n", codec->revision_id); |