All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume".
@ 2008-10-19  1:42 William Pitcock
  2008-10-19  8:49 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: William Pitcock @ 2008-10-19  1:42 UTC (permalink / raw)
  To: alsa-devel

The OSS4-provided master mixer control is actually relative to EMU20K1 port
volume settings. So, it should be named PCM. The Master mixer control will be
shortly readded as a control which sets the master volume.

Signed-off-by: William Pitcock <nenolod@sacredspiral.co.uk>
---
 sound/pci/sbxfi/sbxfi.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
index c006278..3e99a97 100644
--- a/sound/pci/sbxfi/sbxfi.c
+++ b/sound/pci/sbxfi/sbxfi.c
@@ -155,7 +155,7 @@ struct sbxfi {
 	int timer_reprogram;
 
 	unsigned int base_rate;
-	int master_vol[2];
+	int pcm_vol[2];
 	int capture_vol[2];
 	int capsrc;
 	int micboost;
@@ -1103,7 +1103,7 @@ static void sbxfi_setup_play_mixer(struct sbxfi *chip,
 	int i, vol, audio_ch;
 
 	for (i = 0; i < 2; i++) {
-		vol = port->vol[i] + chip->master_vol[i] - MAX_VOLUME;
+		vol = port->vol[i] + chip->pcm_vol[i] - MAX_VOLUME;
 		if (vol < 0)
 			vol = 0;
 		vol = amop_vol_table[vol];
@@ -1124,9 +1124,9 @@ static int sbxfi_update_play_mixer(struct sbxfi *chip, int *vol)
 	struct sbxfi_port *port;
 
 	for (i = 0; i < 2; i++) {
-		if (vol[i] == chip->master_vol[i])
+		if (vol[i] == chip->pcm_vol[i])
 			continue;
-		chip->master_vol[i] = vol[i];
+		chip->pcm_vol[i] = vol[i];
 		spin_lock_irq(&chip->port_lock);
 		list_for_each_entry(port, &chip->port_list, list) {
 			if (port->substream->stream !=
@@ -1516,7 +1516,7 @@ static int __devinit sbxfi_create_pcm(struct sbxfi *chip)
 /*
  * Mixer interface
  */
-static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
+static int sbxfi_pcm_vol_info(struct snd_kcontrol *kcontrol,
 				 struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
@@ -1526,16 +1526,16 @@ static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
 	return 0;
 }
 
-static int sbxfi_master_vol_get(struct snd_kcontrol *kcontrol,
+static int sbxfi_pcm_vol_get(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_value *ucontrol)
 {
 	struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
-	ucontrol->value.integer.value[0] = chip->master_vol[0];
-	ucontrol->value.integer.value[1] = chip->master_vol[1];
+	ucontrol->value.integer.value[0] = chip->pcm_vol[0];
+	ucontrol->value.integer.value[1] = chip->pcm_vol[1];
 	return 0;
 }
 
-static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
+static int sbxfi_pcm_vol_put(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_value *ucontrol)
 {
 	struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
@@ -1543,7 +1543,7 @@ static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
 
 	vol[0] = ucontrol->value.integer.value[0];
 	vol[1] = ucontrol->value.integer.value[1];
-	if (!memcmp(vol, chip->master_vol, sizeof(vol)))
+	if (!memcmp(vol, chip->pcm_vol, sizeof(vol)))
 		return 0;
 
 	if (vol[0] < 0)
@@ -1658,13 +1658,13 @@ static int sbxfi_micboost_put(struct snd_kcontrol *kcontrol,
 
 static struct snd_kcontrol_new mixers[] __devinitdata = {
 	{
-		.name = "Master Playback Volume",
+		.name = "PCM Playback Volume",
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.access = (SNDRV_CTL_ELEM_ACCESS_READWRITE
 			   /* | SNDRV_CTL_ELEM_ACCESS_TLV_READ*/),
-		.info = sbxfi_master_vol_info,
-		.get = sbxfi_master_vol_get,
-		.put = sbxfi_master_vol_put,
+		.info = sbxfi_pcm_vol_info,
+		.get = sbxfi_pcm_vol_get,
+		.put = sbxfi_pcm_vol_put,
 		/*.tlv = { .p = db_master_vol }*/
 	},
 	{
-- 
1.5.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume".
@ 2008-10-19  1:42 William Pitcock
  0 siblings, 0 replies; 6+ messages in thread
From: William Pitcock @ 2008-10-19  1:42 UTC (permalink / raw)
  To: alsa-devel

The OSS4-provided master mixer control is actually relative to EMU20K1 port
volume settings. So, it should be named PCM. The Master mixer control will be
shortly readded as a control which sets the master volume.

Signed-off-by: William Pitcock <nenolod@petrie.sacredspiral.co.uk>
---
 sound/pci/sbxfi/sbxfi.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
index c006278..3e99a97 100644
--- a/sound/pci/sbxfi/sbxfi.c
+++ b/sound/pci/sbxfi/sbxfi.c
@@ -155,7 +155,7 @@ struct sbxfi {
 	int timer_reprogram;
 
 	unsigned int base_rate;
-	int master_vol[2];
+	int pcm_vol[2];
 	int capture_vol[2];
 	int capsrc;
 	int micboost;
@@ -1103,7 +1103,7 @@ static void sbxfi_setup_play_mixer(struct sbxfi *chip,
 	int i, vol, audio_ch;
 
 	for (i = 0; i < 2; i++) {
-		vol = port->vol[i] + chip->master_vol[i] - MAX_VOLUME;
+		vol = port->vol[i] + chip->pcm_vol[i] - MAX_VOLUME;
 		if (vol < 0)
 			vol = 0;
 		vol = amop_vol_table[vol];
@@ -1124,9 +1124,9 @@ static int sbxfi_update_play_mixer(struct sbxfi *chip, int *vol)
 	struct sbxfi_port *port;
 
 	for (i = 0; i < 2; i++) {
-		if (vol[i] == chip->master_vol[i])
+		if (vol[i] == chip->pcm_vol[i])
 			continue;
-		chip->master_vol[i] = vol[i];
+		chip->pcm_vol[i] = vol[i];
 		spin_lock_irq(&chip->port_lock);
 		list_for_each_entry(port, &chip->port_list, list) {
 			if (port->substream->stream !=
@@ -1516,7 +1516,7 @@ static int __devinit sbxfi_create_pcm(struct sbxfi *chip)
 /*
  * Mixer interface
  */
-static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
+static int sbxfi_pcm_vol_info(struct snd_kcontrol *kcontrol,
 				 struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
@@ -1526,16 +1526,16 @@ static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
 	return 0;
 }
 
-static int sbxfi_master_vol_get(struct snd_kcontrol *kcontrol,
+static int sbxfi_pcm_vol_get(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_value *ucontrol)
 {
 	struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
-	ucontrol->value.integer.value[0] = chip->master_vol[0];
-	ucontrol->value.integer.value[1] = chip->master_vol[1];
+	ucontrol->value.integer.value[0] = chip->pcm_vol[0];
+	ucontrol->value.integer.value[1] = chip->pcm_vol[1];
 	return 0;
 }
 
-static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
+static int sbxfi_pcm_vol_put(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_value *ucontrol)
 {
 	struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
@@ -1543,7 +1543,7 @@ static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
 
 	vol[0] = ucontrol->value.integer.value[0];
 	vol[1] = ucontrol->value.integer.value[1];
-	if (!memcmp(vol, chip->master_vol, sizeof(vol)))
+	if (!memcmp(vol, chip->pcm_vol, sizeof(vol)))
 		return 0;
 
 	if (vol[0] < 0)
@@ -1658,13 +1658,13 @@ static int sbxfi_micboost_put(struct snd_kcontrol *kcontrol,
 
 static struct snd_kcontrol_new mixers[] __devinitdata = {
 	{
-		.name = "Master Playback Volume",
+		.name = "PCM Playback Volume",
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.access = (SNDRV_CTL_ELEM_ACCESS_READWRITE
 			   /* | SNDRV_CTL_ELEM_ACCESS_TLV_READ*/),
-		.info = sbxfi_master_vol_info,
-		.get = sbxfi_master_vol_get,
-		.put = sbxfi_master_vol_put,
+		.info = sbxfi_pcm_vol_info,
+		.get = sbxfi_pcm_vol_get,
+		.put = sbxfi_pcm_vol_put,
 		/*.tlv = { .p = db_master_vol }*/
 	},
 	{
-- 
1.5.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume".
  2008-10-19  1:42 [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume" William Pitcock
@ 2008-10-19  8:49 ` Takashi Iwai
  2008-10-19  8:50   ` Takashi Iwai
  2008-10-19  8:51   ` Vedran Miletić
  0 siblings, 2 replies; 6+ messages in thread
From: Takashi Iwai @ 2008-10-19  8:49 UTC (permalink / raw)
  To: William Pitcock; +Cc: alsa-devel

At Sat, 18 Oct 2008 20:42:24 -0500,
William Pitcock wrote:
> 
> The OSS4-provided master mixer control is actually relative to EMU20K1 port
> volume settings. So, it should be named PCM. The Master mixer control will be
> shortly readded as a control which sets the master volume.
> 
> Signed-off-by: William Pitcock <nenolod@sacredspiral.co.uk>

I postpone this until you send the Master control addition.
Most apps requires Master control rather than PCM control, AFAIK.


Takashi

> ---
>  sound/pci/sbxfi/sbxfi.c |   28 ++++++++++++++--------------
>  1 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
> index c006278..3e99a97 100644
> --- a/sound/pci/sbxfi/sbxfi.c
> +++ b/sound/pci/sbxfi/sbxfi.c
> @@ -155,7 +155,7 @@ struct sbxfi {
>  	int timer_reprogram;
>  
>  	unsigned int base_rate;
> -	int master_vol[2];
> +	int pcm_vol[2];
>  	int capture_vol[2];
>  	int capsrc;
>  	int micboost;
> @@ -1103,7 +1103,7 @@ static void sbxfi_setup_play_mixer(struct sbxfi *chip,
>  	int i, vol, audio_ch;
>  
>  	for (i = 0; i < 2; i++) {
> -		vol = port->vol[i] + chip->master_vol[i] - MAX_VOLUME;
> +		vol = port->vol[i] + chip->pcm_vol[i] - MAX_VOLUME;
>  		if (vol < 0)
>  			vol = 0;
>  		vol = amop_vol_table[vol];
> @@ -1124,9 +1124,9 @@ static int sbxfi_update_play_mixer(struct sbxfi *chip, int *vol)
>  	struct sbxfi_port *port;
>  
>  	for (i = 0; i < 2; i++) {
> -		if (vol[i] == chip->master_vol[i])
> +		if (vol[i] == chip->pcm_vol[i])
>  			continue;
> -		chip->master_vol[i] = vol[i];
> +		chip->pcm_vol[i] = vol[i];
>  		spin_lock_irq(&chip->port_lock);
>  		list_for_each_entry(port, &chip->port_list, list) {
>  			if (port->substream->stream !=
> @@ -1516,7 +1516,7 @@ static int __devinit sbxfi_create_pcm(struct sbxfi *chip)
>  /*
>   * Mixer interface
>   */
> -static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
> +static int sbxfi_pcm_vol_info(struct snd_kcontrol *kcontrol,
>  				 struct snd_ctl_elem_info *uinfo)
>  {
>  	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
> @@ -1526,16 +1526,16 @@ static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
>  	return 0;
>  }
>  
> -static int sbxfi_master_vol_get(struct snd_kcontrol *kcontrol,
> +static int sbxfi_pcm_vol_get(struct snd_kcontrol *kcontrol,
>  				struct snd_ctl_elem_value *ucontrol)
>  {
>  	struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
> -	ucontrol->value.integer.value[0] = chip->master_vol[0];
> -	ucontrol->value.integer.value[1] = chip->master_vol[1];
> +	ucontrol->value.integer.value[0] = chip->pcm_vol[0];
> +	ucontrol->value.integer.value[1] = chip->pcm_vol[1];
>  	return 0;
>  }
>  
> -static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
> +static int sbxfi_pcm_vol_put(struct snd_kcontrol *kcontrol,
>  				struct snd_ctl_elem_value *ucontrol)
>  {
>  	struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
> @@ -1543,7 +1543,7 @@ static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
>  
>  	vol[0] = ucontrol->value.integer.value[0];
>  	vol[1] = ucontrol->value.integer.value[1];
> -	if (!memcmp(vol, chip->master_vol, sizeof(vol)))
> +	if (!memcmp(vol, chip->pcm_vol, sizeof(vol)))
>  		return 0;
>  
>  	if (vol[0] < 0)
> @@ -1658,13 +1658,13 @@ static int sbxfi_micboost_put(struct snd_kcontrol *kcontrol,
>  
>  static struct snd_kcontrol_new mixers[] __devinitdata = {
>  	{
> -		.name = "Master Playback Volume",
> +		.name = "PCM Playback Volume",
>  		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
>  		.access = (SNDRV_CTL_ELEM_ACCESS_READWRITE
>  			   /* | SNDRV_CTL_ELEM_ACCESS_TLV_READ*/),
> -		.info = sbxfi_master_vol_info,
> -		.get = sbxfi_master_vol_get,
> -		.put = sbxfi_master_vol_put,
> +		.info = sbxfi_pcm_vol_info,
> +		.get = sbxfi_pcm_vol_get,
> +		.put = sbxfi_pcm_vol_put,
>  		/*.tlv = { .p = db_master_vol }*/
>  	},
>  	{
> -- 
> 1.5.5.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume".
  2008-10-19  8:49 ` Takashi Iwai
@ 2008-10-19  8:50   ` Takashi Iwai
  2008-10-19  8:51   ` Vedran Miletić
  1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2008-10-19  8:50 UTC (permalink / raw)
  To: William Pitcock; +Cc: alsa-devel

At Sun, 19 Oct 2008 10:49:17 +0200,
I wrote:
> 
> At Sat, 18 Oct 2008 20:42:24 -0500,
> William Pitcock wrote:
> > 
> > The OSS4-provided master mixer control is actually relative to EMU20K1 port
> > volume settings. So, it should be named PCM. The Master mixer control will be
> > shortly readded as a control which sets the master volume.
> > 
> > Signed-off-by: William Pitcock <nenolod@sacredspiral.co.uk>
> 
> I postpone this until you send the Master control addition.
> Most apps requires Master control rather than PCM control, AFAIK.

BTW, please add my address to Cc in your post so that it will reach me 
more certainly and quickly.

thanks,

Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume".
  2008-10-19  8:49 ` Takashi Iwai
  2008-10-19  8:50   ` Takashi Iwai
@ 2008-10-19  8:51   ` Vedran Miletić
  2008-10-19 11:12     ` Takashi Iwai
  1 sibling, 1 reply; 6+ messages in thread
From: Vedran Miletić @ 2008-10-19  8:51 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel mailing list

Sorry to go off-topic, but there are lots of cards that don't have
Master control. Would this qualify as a bug?

2008/10/19 Takashi Iwai <tiwai@suse.de>:
> At Sat, 18 Oct 2008 20:42:24 -0500,
> William Pitcock wrote:
>>
>> The OSS4-provided master mixer control is actually relative to EMU20K1 port
>> volume settings. So, it should be named PCM. The Master mixer control will be
>> shortly readded as a control which sets the master volume.
>>
>> Signed-off-by: William Pitcock <nenolod@sacredspiral.co.uk>
>
> I postpone this until you send the Master control addition.
> Most apps requires Master control rather than PCM control, AFAIK.
>
>
> Takashi
>
>> ---
>>  sound/pci/sbxfi/sbxfi.c |   28 ++++++++++++++--------------
>>  1 files changed, 14 insertions(+), 14 deletions(-)
>>
>> diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
>> index c006278..3e99a97 100644
>> --- a/sound/pci/sbxfi/sbxfi.c
>> +++ b/sound/pci/sbxfi/sbxfi.c
>> @@ -155,7 +155,7 @@ struct sbxfi {
>>       int timer_reprogram;
>>
>>       unsigned int base_rate;
>> -     int master_vol[2];
>> +     int pcm_vol[2];
>>       int capture_vol[2];
>>       int capsrc;
>>       int micboost;
>> @@ -1103,7 +1103,7 @@ static void sbxfi_setup_play_mixer(struct sbxfi *chip,
>>       int i, vol, audio_ch;
>>
>>       for (i = 0; i < 2; i++) {
>> -             vol = port->vol[i] + chip->master_vol[i] - MAX_VOLUME;
>> +             vol = port->vol[i] + chip->pcm_vol[i] - MAX_VOLUME;
>>               if (vol < 0)
>>                       vol = 0;
>>               vol = amop_vol_table[vol];
>> @@ -1124,9 +1124,9 @@ static int sbxfi_update_play_mixer(struct sbxfi *chip, int *vol)
>>       struct sbxfi_port *port;
>>
>>       for (i = 0; i < 2; i++) {
>> -             if (vol[i] == chip->master_vol[i])
>> +             if (vol[i] == chip->pcm_vol[i])
>>                       continue;
>> -             chip->master_vol[i] = vol[i];
>> +             chip->pcm_vol[i] = vol[i];
>>               spin_lock_irq(&chip->port_lock);
>>               list_for_each_entry(port, &chip->port_list, list) {
>>                       if (port->substream->stream !=
>> @@ -1516,7 +1516,7 @@ static int __devinit sbxfi_create_pcm(struct sbxfi *chip)
>>  /*
>>   * Mixer interface
>>   */
>> -static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
>> +static int sbxfi_pcm_vol_info(struct snd_kcontrol *kcontrol,
>>                                struct snd_ctl_elem_info *uinfo)
>>  {
>>       uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
>> @@ -1526,16 +1526,16 @@ static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
>>       return 0;
>>  }
>>
>> -static int sbxfi_master_vol_get(struct snd_kcontrol *kcontrol,
>> +static int sbxfi_pcm_vol_get(struct snd_kcontrol *kcontrol,
>>                               struct snd_ctl_elem_value *ucontrol)
>>  {
>>       struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
>> -     ucontrol->value.integer.value[0] = chip->master_vol[0];
>> -     ucontrol->value.integer.value[1] = chip->master_vol[1];
>> +     ucontrol->value.integer.value[0] = chip->pcm_vol[0];
>> +     ucontrol->value.integer.value[1] = chip->pcm_vol[1];
>>       return 0;
>>  }
>>
>> -static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
>> +static int sbxfi_pcm_vol_put(struct snd_kcontrol *kcontrol,
>>                               struct snd_ctl_elem_value *ucontrol)
>>  {
>>       struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
>> @@ -1543,7 +1543,7 @@ static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
>>
>>       vol[0] = ucontrol->value.integer.value[0];
>>       vol[1] = ucontrol->value.integer.value[1];
>> -     if (!memcmp(vol, chip->master_vol, sizeof(vol)))
>> +     if (!memcmp(vol, chip->pcm_vol, sizeof(vol)))
>>               return 0;
>>
>>       if (vol[0] < 0)
>> @@ -1658,13 +1658,13 @@ static int sbxfi_micboost_put(struct snd_kcontrol *kcontrol,
>>
>>  static struct snd_kcontrol_new mixers[] __devinitdata = {
>>       {
>> -             .name = "Master Playback Volume",
>> +             .name = "PCM Playback Volume",
>>               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
>>               .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE
>>                          /* | SNDRV_CTL_ELEM_ACCESS_TLV_READ*/),
>> -             .info = sbxfi_master_vol_info,
>> -             .get = sbxfi_master_vol_get,
>> -             .put = sbxfi_master_vol_put,
>> +             .info = sbxfi_pcm_vol_info,
>> +             .get = sbxfi_pcm_vol_get,
>> +             .put = sbxfi_pcm_vol_put,
>>               /*.tlv = { .p = db_master_vol }*/
>>       },
>>       {
>> --
>> 1.5.5.4
>>
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>



-- 
Vedran Miletić
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume".
  2008-10-19  8:51   ` Vedran Miletić
@ 2008-10-19 11:12     ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2008-10-19 11:12 UTC (permalink / raw)
  To: Vedran Miletić; +Cc: alsa-devel mailing list

At Sun, 19 Oct 2008 10:51:15 +0200,
=?UTF-8?Q?Vedran_Mileti=C4=87?= wrote:
> 
> Sorry to go off-topic, but there are lots of cards that don't have
> Master control. Would this qualify as a bug?

No, it's no bug.  Such hardware has really no master volume control
in design.


Takashi

> 
> 2008/10/19 Takashi Iwai <tiwai@suse.de>:
> > At Sat, 18 Oct 2008 20:42:24 -0500,
> > William Pitcock wrote:
> >>
> >> The OSS4-provided master mixer control is actually relative to EMU20K1 port
> >> volume settings. So, it should be named PCM. The Master mixer control will be
> >> shortly readded as a control which sets the master volume.
> >>
> >> Signed-off-by: William Pitcock <nenolod@sacredspiral.co.uk>
> >
> > I postpone this until you send the Master control addition.
> > Most apps requires Master control rather than PCM control, AFAIK.
> >
> >
> > Takashi
> >
> >> ---
> >>  sound/pci/sbxfi/sbxfi.c |   28 ++++++++++++++--------------
> >>  1 files changed, 14 insertions(+), 14 deletions(-)
> >>
> >> diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
> >> index c006278..3e99a97 100644
> >> --- a/sound/pci/sbxfi/sbxfi.c
> >> +++ b/sound/pci/sbxfi/sbxfi.c
> >> @@ -155,7 +155,7 @@ struct sbxfi {
> >>       int timer_reprogram;
> >>
> >>       unsigned int base_rate;
> >> -     int master_vol[2];
> >> +     int pcm_vol[2];
> >>       int capture_vol[2];
> >>       int capsrc;
> >>       int micboost;
> >> @@ -1103,7 +1103,7 @@ static void sbxfi_setup_play_mixer(struct sbxfi *chip,
> >>       int i, vol, audio_ch;
> >>
> >>       for (i = 0; i < 2; i++) {
> >> -             vol = port->vol[i] + chip->master_vol[i] - MAX_VOLUME;
> >> +             vol = port->vol[i] + chip->pcm_vol[i] - MAX_VOLUME;
> >>               if (vol < 0)
> >>                       vol = 0;
> >>               vol = amop_vol_table[vol];
> >> @@ -1124,9 +1124,9 @@ static int sbxfi_update_play_mixer(struct sbxfi *chip, int *vol)
> >>       struct sbxfi_port *port;
> >>
> >>       for (i = 0; i < 2; i++) {
> >> -             if (vol[i] == chip->master_vol[i])
> >> +             if (vol[i] == chip->pcm_vol[i])
> >>                       continue;
> >> -             chip->master_vol[i] = vol[i];
> >> +             chip->pcm_vol[i] = vol[i];
> >>               spin_lock_irq(&chip->port_lock);
> >>               list_for_each_entry(port, &chip->port_list, list) {
> >>                       if (port->substream->stream !=
> >> @@ -1516,7 +1516,7 @@ static int __devinit sbxfi_create_pcm(struct sbxfi *chip)
> >>  /*
> >>   * Mixer interface
> >>   */
> >> -static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
> >> +static int sbxfi_pcm_vol_info(struct snd_kcontrol *kcontrol,
> >>                                struct snd_ctl_elem_info *uinfo)
> >>  {
> >>       uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
> >> @@ -1526,16 +1526,16 @@ static int sbxfi_master_vol_info(struct snd_kcontrol *kcontrol,
> >>       return 0;
> >>  }
> >>
> >> -static int sbxfi_master_vol_get(struct snd_kcontrol *kcontrol,
> >> +static int sbxfi_pcm_vol_get(struct snd_kcontrol *kcontrol,
> >>                               struct snd_ctl_elem_value *ucontrol)
> >>  {
> >>       struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
> >> -     ucontrol->value.integer.value[0] = chip->master_vol[0];
> >> -     ucontrol->value.integer.value[1] = chip->master_vol[1];
> >> +     ucontrol->value.integer.value[0] = chip->pcm_vol[0];
> >> +     ucontrol->value.integer.value[1] = chip->pcm_vol[1];
> >>       return 0;
> >>  }
> >>
> >> -static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
> >> +static int sbxfi_pcm_vol_put(struct snd_kcontrol *kcontrol,
> >>                               struct snd_ctl_elem_value *ucontrol)
> >>  {
> >>       struct sbxfi *chip = snd_kcontrol_chip(kcontrol);
> >> @@ -1543,7 +1543,7 @@ static int sbxfi_master_vol_put(struct snd_kcontrol *kcontrol,
> >>
> >>       vol[0] = ucontrol->value.integer.value[0];
> >>       vol[1] = ucontrol->value.integer.value[1];
> >> -     if (!memcmp(vol, chip->master_vol, sizeof(vol)))
> >> +     if (!memcmp(vol, chip->pcm_vol, sizeof(vol)))
> >>               return 0;
> >>
> >>       if (vol[0] < 0)
> >> @@ -1658,13 +1658,13 @@ static int sbxfi_micboost_put(struct snd_kcontrol *kcontrol,
> >>
> >>  static struct snd_kcontrol_new mixers[] __devinitdata = {
> >>       {
> >> -             .name = "Master Playback Volume",
> >> +             .name = "PCM Playback Volume",
> >>               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
> >>               .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE
> >>                          /* | SNDRV_CTL_ELEM_ACCESS_TLV_READ*/),
> >> -             .info = sbxfi_master_vol_info,
> >> -             .get = sbxfi_master_vol_get,
> >> -             .put = sbxfi_master_vol_put,
> >> +             .info = sbxfi_pcm_vol_info,
> >> +             .get = sbxfi_pcm_vol_get,
> >> +             .put = sbxfi_pcm_vol_put,
> >>               /*.tlv = { .p = db_master_vol }*/
> >>       },
> >>       {
> >> --
> >> 1.5.5.4
> >>
> >> _______________________________________________
> >> Alsa-devel mailing list
> >> Alsa-devel@alsa-project.org
> >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >>
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >
> 
> 
> 
> -- 
> Vedran Miletić
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-19 11:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-19  1:42 [PATCH] snd-sbxfi: rename erroneous Master mixer control to "PCM Playback Volume" William Pitcock
2008-10-19  8:49 ` Takashi Iwai
2008-10-19  8:50   ` Takashi Iwai
2008-10-19  8:51   ` Vedran Miletić
2008-10-19 11:12     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2008-10-19  1:42 William Pitcock

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.