diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-07-19 17:42:09 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-19 17:42:09 +0200 |
commit | 8d011cc7a9374db9b5ace3b75d34f10fdc3b51c4 (patch) | |
tree | 6561bac3271ad8e46ed214bc92db362e1c56316a /sound | |
parent | e2768c0c223d86a20ec392528bafd25996ce7585 (diff) | |
parent | 9e216e8a40428cbf689222148c28d0256fbd0186 (diff) | |
download | op-kernel-dev-8d011cc7a9374db9b5ace3b75d34f10fdc3b51c4.zip op-kernel-dev-8d011cc7a9374db9b5ace3b75d34f10fdc3b51c4.tar.gz |
Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc
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 bcf95d3..e23e0e7 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 } else { if (new_hw_ptr == ULONG_MAX) { /* initialization */ snd_pcm_sframes_t avail = snd_pcm_playback_hw_avail(runtime); + if (avail > runtime->buffer_size) + avail = runtime->buffer_size; runtime->silence_filled = avail > 0 ? avail : 0; runtime->silence_start = (runtime->status->hw_ptr + runtime->silence_filled) % diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index a3d638c..6e0de65 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) total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); for (i = 0; i < total_nodes; i++, nid++) { function_id = snd_hda_param_read(codec, nid, - AC_PAR_FUNCTION_TYPE) & 0xff; + AC_PAR_FUNCTION_TYPE); switch (function_id) { case AC_GRP_AUDIO_FUNCTION: codec->afg = nid; - codec->function_id = function_id; + codec->afg_function_id = function_id & 0xff; + codec->afg_unsol = (function_id >> 8) & 1; break; case AC_GRP_MODEM_FUNCTION: codec->mfg = nid; - codec->function_id = function_id; + codec->mfg_function_id = function_id & 0xff; + codec->mfg_unsol = (function_id >> 8) & 1; break; default: break; diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 49e939e..f96e909 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -760,7 +760,10 @@ struct hda_codec { hda_nid_t mfg; /* MFG node id */ /* ids */ - u32 function_id; + u8 afg_function_id; + u8 mfg_function_id; + u8 afg_unsol; + u8 mfg_unsol; u32 vendor_id; u32 subsystem_id; u32 revision_id; diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index f97d35d..f025200 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, else snd_iprintf(buffer, "Not Set\n"); snd_iprintf(buffer, "Address: %d\n", codec->addr); - snd_iprintf(buffer, "Function Id: 0x%x\n", codec->function_id); + if (codec->afg) + snd_iprintf(buffer, "AFG Function Id: 0x%x (unsol %u)\n", + codec->afg_function_id, codec->afg_unsol); + if (codec->mfg) + snd_iprintf(buffer, "MFG Function Id: 0x%x (unsol %u)\n", + codec->mfg_function_id, codec->mfg_unsol); snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id); snd_iprintf(buffer, "Subsystem Id: 0x%08x\n", codec->subsystem_id); snd_iprintf(buffer, "Revision Id: 0x%x\n", codec->revision_id); |