diff options
-rw-r--r-- | sound/core/compress_offload.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/pci/ice1712/prodigy_hifi.c | 3 | ||||
-rw-r--r-- | sound/usb/pcm.c | 6 |
6 files changed, 14 insertions, 8 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index ec2118d0e27a..eb60cb8dbb8a 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c | |||
@@ -80,14 +80,12 @@ static int snd_compr_open(struct inode *inode, struct file *f) | |||
80 | int maj = imajor(inode); | 80 | int maj = imajor(inode); |
81 | int ret; | 81 | int ret; |
82 | 82 | ||
83 | if (f->f_flags & O_WRONLY) | 83 | if ((f->f_flags & O_ACCMODE) == O_WRONLY) |
84 | dirn = SND_COMPRESS_PLAYBACK; | 84 | dirn = SND_COMPRESS_PLAYBACK; |
85 | else if (f->f_flags & O_RDONLY) | 85 | else if ((f->f_flags & O_ACCMODE) == O_RDONLY) |
86 | dirn = SND_COMPRESS_CAPTURE; | 86 | dirn = SND_COMPRESS_CAPTURE; |
87 | else { | 87 | else |
88 | pr_err("invalid direction\n"); | ||
89 | return -EINVAL; | 88 | return -EINVAL; |
90 | } | ||
91 | 89 | ||
92 | if (maj == snd_major) | 90 | if (maj == snd_major) |
93 | compr = snd_lookup_minor_data(iminor(inode), | 91 | compr = snd_lookup_minor_data(iminor(inode), |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index f25c24c743f9..1c65cc5e3a31 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -2353,6 +2353,7 @@ int snd_hda_codec_reset(struct hda_codec *codec) | |||
2353 | } | 2353 | } |
2354 | if (codec->patch_ops.free) | 2354 | if (codec->patch_ops.free) |
2355 | codec->patch_ops.free(codec); | 2355 | codec->patch_ops.free(codec); |
2356 | memset(&codec->patch_ops, 0, sizeof(codec->patch_ops)); | ||
2356 | snd_hda_jack_tbl_clear(codec); | 2357 | snd_hda_jack_tbl_clear(codec); |
2357 | codec->proc_widget_hook = NULL; | 2358 | codec->proc_widget_hook = NULL; |
2358 | codec->spec = NULL; | 2359 | codec->spec = NULL; |
@@ -2368,7 +2369,6 @@ int snd_hda_codec_reset(struct hda_codec *codec) | |||
2368 | codec->num_pcms = 0; | 2369 | codec->num_pcms = 0; |
2369 | codec->pcm_info = NULL; | 2370 | codec->pcm_info = NULL; |
2370 | codec->preset = NULL; | 2371 | codec->preset = NULL; |
2371 | memset(&codec->patch_ops, 0, sizeof(codec->patch_ops)); | ||
2372 | codec->slave_dig_outs = NULL; | 2372 | codec->slave_dig_outs = NULL; |
2373 | codec->spdif_status_reset = 0; | 2373 | codec->spdif_status_reset = 0; |
2374 | module_put(codec->owner); | 2374 | module_put(codec->owner); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 60882c62f180..228cdf93fa29 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2701,6 +2701,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { | |||
2701 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), | 2701 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), |
2702 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), | 2702 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), |
2703 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), | 2703 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), |
2704 | SND_PCI_QUIRK(0x1043, 0x1b43, "ASUS K53E", POS_FIX_POSBUF), | ||
2704 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), | 2705 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), |
2705 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), | 2706 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), |
2706 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), | 2707 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 6f806d3e56bb..3d4722f0a1ca 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1075,7 +1075,7 @@ static struct snd_kcontrol_new stac_smux_mixer = { | |||
1075 | 1075 | ||
1076 | static const char * const slave_pfxs[] = { | 1076 | static const char * const slave_pfxs[] = { |
1077 | "Front", "Surround", "Center", "LFE", "Side", | 1077 | "Front", "Surround", "Center", "LFE", "Side", |
1078 | "Headphone", "Speaker", "IEC958", | 1078 | "Headphone", "Speaker", "IEC958", "PCM", |
1079 | NULL | 1079 | NULL |
1080 | }; | 1080 | }; |
1081 | 1081 | ||
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index 764cc93dbca4..075d5aa1fee0 100644 --- a/sound/pci/ice1712/prodigy_hifi.c +++ b/sound/pci/ice1712/prodigy_hifi.c | |||
@@ -297,6 +297,7 @@ static int ak4396_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem | |||
297 | } | 297 | } |
298 | 298 | ||
299 | static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); | 299 | static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); |
300 | static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0); | ||
300 | 301 | ||
301 | static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = { | 302 | static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = { |
302 | { | 303 | { |
@@ -307,7 +308,7 @@ static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = { | |||
307 | .info = ak4396_dac_vol_info, | 308 | .info = ak4396_dac_vol_info, |
308 | .get = ak4396_dac_vol_get, | 309 | .get = ak4396_dac_vol_get, |
309 | .put = ak4396_dac_vol_put, | 310 | .put = ak4396_dac_vol_put, |
310 | .tlv = { .p = db_scale_wm_dac }, | 311 | .tlv = { .p = ak4396_db_scale }, |
311 | }, | 312 | }, |
312 | }; | 313 | }; |
313 | 314 | ||
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index fd5e982fc98c..f782ce19bf5a 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -1140,6 +1140,12 @@ static void retire_playback_urb(struct snd_usb_substream *subs, | |||
1140 | int processed = urb->transfer_buffer_length / stride; | 1140 | int processed = urb->transfer_buffer_length / stride; |
1141 | int est_delay; | 1141 | int est_delay; |
1142 | 1142 | ||
1143 | /* ignore the delay accounting when procssed=0 is given, i.e. | ||
1144 | * silent payloads are procssed before handling the actual data | ||
1145 | */ | ||
1146 | if (!processed) | ||
1147 | return; | ||
1148 | |||
1143 | spin_lock_irqsave(&subs->lock, flags); | 1149 | spin_lock_irqsave(&subs->lock, flags); |
1144 | est_delay = snd_usb_pcm_delay(subs, runtime->rate); | 1150 | est_delay = snd_usb_pcm_delay(subs, runtime->rate); |
1145 | /* update delay with exact number of samples played */ | 1151 | /* update delay with exact number of samples played */ |