From ca2585afa013ec2cf99a48e46d6b82df2e240493 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 14 Jun 2011 08:14:32 +0200 Subject: ALSA: hda - Fix missing static inline to beep dummy function The commit 2308f4add3de9f6c9c9f02e49461e94d84bb200a missed static inline thus it resulted in multiple-definitions error at linking. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_beep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_beep.h b/sound/pci/hda/hda_beep.h index 4967eabe774..55f0647458c 100644 --- a/sound/pci/hda/hda_beep.h +++ b/sound/pci/hda/hda_beep.h @@ -54,7 +54,7 @@ static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) { return 0; } -void snd_hda_detach_beep_device(struct hda_codec *codec) +static inline void snd_hda_detach_beep_device(struct hda_codec *codec) { } #endif -- cgit v1.2.3 From e72888e91cc902ccdc089f237b6eed7587e2b4df Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 15 Jun 2011 15:14:49 +0200 Subject: ALSA: lola - Fix section mismatch Add missing __devinit. Signed-off-by: Takashi Iwai --- sound/pci/lola/lola.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index 34b24286d27..2692e5ae5f2 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c @@ -445,7 +445,7 @@ static void lola_reset_setups(struct lola *chip) lola_setup_all_analog_gains(chip, PLAY, false); /* output, update */ } -static int lola_parse_tree(struct lola *chip) +static int __devinit lola_parse_tree(struct lola *chip) { unsigned int val; int nid, err; -- cgit v1.2.3 From 0ec5258d68c626922d92e2f0e4e5c689e5360a5d Mon Sep 17 00:00:00 2001 From: Torsten Schenk Date: Thu, 16 Jun 2011 21:06:27 +0200 Subject: ALSA: 6fire - Fix signedness bug Fixed remaining issues of the signedness bug discovered by Dan Carpenter. A check was remaining that tests if unsigned rt->rate is >= 0. Changed that so that rt->rate now consistently uses ARRAY_SIZE(rates) as invalid rate value and not -1. Signed-off-by: Torsten Schenk Signed-off-by: Takashi Iwai --- sound/usb/6fire/pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c index b137b25865c..d144cdb2f15 100644 --- a/sound/usb/6fire/pcm.c +++ b/sound/usb/6fire/pcm.c @@ -395,12 +395,12 @@ static int usb6fire_pcm_open(struct snd_pcm_substream *alsa_sub) alsa_rt->hw = pcm_hw; if (alsa_sub->stream == SNDRV_PCM_STREAM_PLAYBACK) { - if (rt->rate >= 0) + if (rt->rate < ARRAY_SIZE(rates)) alsa_rt->hw.rates = rates_alsaid[rt->rate]; alsa_rt->hw.channels_max = OUT_N_CHANNELS; sub = &rt->playback; } else if (alsa_sub->stream == SNDRV_PCM_STREAM_CAPTURE) { - if (rt->rate >= 0) + if (rt->rate < ARRAY_SIZE(rates)) alsa_rt->hw.rates = rates_alsaid[rt->rate]; alsa_rt->hw.channels_max = IN_N_CHANNELS; sub = &rt->capture; -- cgit v1.2.3 From cf6f1ff17f56c275424c5a341fc4d27ccbbfa71c Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Fri, 17 Jun 2011 08:18:35 +0200 Subject: ALSA: isight: adjust for new queueing API Since commit 13882a82ee16 (optimize iso queueing by setting wake only after the last packet), drivers are required to call fw_iso_context_queue_flush() after queueing a batch of packets. The missing call would have an effect only if the controller queue underruns, but then the DMA would stop completely. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- sound/firewire/isight.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index 86ee16ca365..440030818db 100644 --- a/sound/firewire/isight.c +++ b/sound/firewire/isight.c @@ -209,6 +209,7 @@ static void isight_packet(struct fw_iso_context *context, u32 cycle, isight->packet_index = -1; return; } + fw_iso_context_queue_flush(isight->context); if (++index >= QUEUE_LENGTH) index = 0; -- cgit v1.2.3 From ad2409413d09fca763be1ac5161f2a9d82367903 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 17 Jun 2011 14:23:46 +0200 Subject: ALSA: hda - Fix no NID error with VIA codecs The via driver spews warnigs like hda-codec: no NID for mapping control Independent HP:0:0 with some codecs because snd_hda_add_nid() is called with nid=0. This patch fixes it by skipping the call when no corresponding widget is found. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_via.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 605c99e1e52..c952582fb21 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -832,10 +832,13 @@ static int via_hp_build(struct hda_codec *codec) knew->subdevice = HDA_SUBDEV_NID_FLAG | nid; knew->private_value = nid; - knew = via_clone_control(spec, &via_hp_mixer[1]); - if (knew == NULL) - return -ENOMEM; - knew->subdevice = side_mute_channel(spec); + nid = side_mute_channel(spec); + if (nid) { + knew = via_clone_control(spec, &via_hp_mixer[1]); + if (knew == NULL) + return -ENOMEM; + knew->subdevice = nid; + } return 0; } -- cgit v1.2.3