Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152540920
D55605.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
993 B
Referenced Files
None
Subscribers
None
D55605.id.diff
View Options
diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c
--- a/sys/dev/sound/pcm/feeder_volume.c
+++ b/sys/dev/sound/pcm/feeder_volume.c
@@ -242,11 +242,14 @@
{
int temp_vol[SND_CHN_T_VOL_MAX];
struct feed_volume_info *info;
+ struct snd_mixer *m;
+ struct snddev_info *d;
uint32_t j, align;
int i, *matrix;
uint8_t *dst;
const int16_t *vol;
const int8_t *muted;
+ bool master_muted = false;
/*
* Fetch filter data operation.
@@ -278,8 +281,14 @@
return (FEEDER_FEED(f->source, c, b, count, source));
/* Check if any controls are muted. */
+ d = (c != NULL) ? c->parentsnddev : NULL;
+ m = (d != NULL && d->mixer_dev != NULL) ? d->mixer_dev->si_drv1 : NULL;
+
+ if (m != NULL)
+ master_muted = (mix_getmutedevs(m) & (1 << SND_VOL_C_MASTER));
+
for (j = 0; j != SND_CHN_T_VOL_MAX; j++)
- temp_vol[j] = muted[j] ? 0 : vol[j];
+ temp_vol[j] = (muted[j] || master_muted) ? 0 : vol[j];
dst = b;
align = info->bps * info->channels;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 1:55 PM (15 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29631379
Default Alt Text
D55605.id.diff (993 B)
Attached To
Mode
D55605: sound: enforce MASTER volume mute during playback
Attached
Detach File
Event Timeline
Log In to Comment