* [PATCH][SOUND]volume control for CSWITCH and CROUTE
@ 2009-04-04 12:38 Viral Mehta
2009-04-07 2:47 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Viral Mehta @ 2009-04-04 12:38 UTC (permalink / raw)
To: alsa-devel, Takashi Iwai
From: Deepika Makhija <deepika.makhija@einfochips.com>
Added an else part to check
SNDRV_MIXER_OSS_PRESENT_CVOLUME for MIC (slot 7)
in commit 36c7b833e5d2501142a371e4e75281d3a29fbd6b
Similarly, checks and volume control is required for
SNDRV_MIXER_OSS_PRESENT_CSWITCH and SNDRV_MIXER_OSS_PRESENT_CROUTE
as well.
Signed-off-by: Deepika Makhija <deepika.makhija@einfochips.com>
Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
---
--- a/sound/core/oss/mixer-oss.c 2009-04-04 17:06:46.000000000 +0530
+++ b/sound/core/oss/mixer-oss.c 2009-04-04 17:04:33.000000000 +0530
@@ -703,19 +703,27 @@ static int snd_mixer_oss_put_volume1(str
if (left || right) {
if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH)
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
+ if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH)
+ snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH)
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE)
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
+ if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE)
+ snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE)
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
} else {
if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH) {
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
+ } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH) {
+ snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
} else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH) {
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
} else if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE) {
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
+ } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE) {
+ snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
} else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE) {
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][SOUND]volume control for CSWITCH and CROUTE
2009-04-04 12:38 [PATCH][SOUND]volume control for CSWITCH and CROUTE Viral Mehta
@ 2009-04-07 2:47 ` Takashi Iwai
2009-04-07 4:40 ` Viral Mehta
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2009-04-07 2:47 UTC (permalink / raw)
To: Viral Mehta; +Cc: alsa-devel
At Sat, 04 Apr 2009 18:08:28 +0530,
Viral Mehta wrote:
>
> From: Deepika Makhija <deepika.makhija@einfochips.com>
>
> Added an else part to check
> SNDRV_MIXER_OSS_PRESENT_CVOLUME for MIC (slot 7)
> in commit 36c7b833e5d2501142a371e4e75281d3a29fbd6b
>
> Similarly, checks and volume control is required for
> SNDRV_MIXER_OSS_PRESENT_CSWITCH and SNDRV_MIXER_OSS_PRESENT_CROUTE
> as well.
>
> Signed-off-by: Deepika Makhija <deepika.makhija@einfochips.com>
> Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
Thanks, applied now to sound git tree.
The original patch wasn't applicable (the file name was wrong) so I
had to apply the patch manually. It'd be helpful to test the patch
before submission at the next time :)
Takashi
> ---
> --- a/sound/core/oss/mixer-oss.c 2009-04-04 17:06:46.000000000 +0530
> +++ b/sound/core/oss/mixer-oss.c 2009-04-04 17:04:33.000000000 +0530
> @@ -703,19 +703,27 @@ static int snd_mixer_oss_put_volume1(str
> if (left || right) {
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH)
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
> + if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH)
> + snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH)
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE)
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
> + if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE)
> + snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE)
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
> } else {
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH) {
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
> + } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH) {
> + snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
> } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH) {
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
> } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE) {
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
> + } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE) {
> + snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
> } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE) {
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][SOUND]volume control for CSWITCH and CROUTE
2009-04-07 2:47 ` Takashi Iwai
@ 2009-04-07 4:40 ` Viral Mehta
0 siblings, 0 replies; 3+ messages in thread
From: Viral Mehta @ 2009-04-07 4:40 UTC (permalink / raw)
To: Takashi Iwai, alsa-devel
Takashi Iwai wrote:
> At Sat, 04 Apr 2009 18:08:28 +0530,
> Viral Mehta wrote:
>
>> From: Deepika Makhija <deepika.makhija@einfochips.com>
>>
>> Added an else part to check
>> SNDRV_MIXER_OSS_PRESENT_CVOLUME for MIC (slot 7)
>> in commit 36c7b833e5d2501142a371e4e75281d3a29fbd6b
>>
>> Similarly, checks and volume control is required for
>> SNDRV_MIXER_OSS_PRESENT_CSWITCH and SNDRV_MIXER_OSS_PRESENT_CROUTE
>> as well.
>>
>> Signed-off-by: Deepika Makhija <deepika.makhija@einfochips.com>
>> Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
>>
>
> Thanks, applied now to sound git tree.
>
> The original patch wasn't applicable (the file name was wrong) so I
> had to apply the patch manually. It'd be helpful to test the patch
> before submission at the next time :)
>
>
> Takashi
>
Thanks for taking care. I am sorry about that mistake.
Yeah, lately I have learned using checkpatch.pl and things which are
helpful before patch submission.
Thanks again,
Viral
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-07 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-04 12:38 [PATCH][SOUND]volume control for CSWITCH and CROUTE Viral Mehta
2009-04-07 2:47 ` Takashi Iwai
2009-04-07 4:40 ` Viral Mehta
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.