* CMI8768 patch
@ 2005-02-17 22:11 "Tien, C.L. - 田承禮"
2005-02-18 10:27 ` Takashi Iwai
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-17 22:11 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
Hi,
I made a patch for CM8768, which has the same PCI ID but there are
several HW diffecece, aas listed:
1. 8768 has no PCM volume control.
2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
3. 8768 can support up to 8 channels.
I made change for item 2 and 3, I want to use the softvol plugin but
don't know how to. The driver just don't generate the PCM volume slider
for now.
The patch file is attached.
Sincerely,
ChenLi Tien
[-- Attachment #2: cmipci.c.patch --]
[-- Type: application/octet-stream, Size: 5019 bytes --]
--- alsa-driver-1.0.8/alsa-kernel/pci/cmipci.c Mon Jan 3 06:45:31 2005
+++ alsa-driver-1.0.8-update/alsa-kernel/pci/cmipci.c Thu Feb 17 12:48:53 2005
@@ -156,6 +156,8 @@
#define CM_CHIP_MASK2 0xff000000
#define CM_CHIP_039 0x04000000
#define CM_CHIP_039_6CH 0x01000000
+#define CM_CHIP_055 0x08000000
+#define CM_CHIP_8768 0x20000000
#define CM_TDMA_INT_EN 0x00040000
#define CM_CH1_INT_EN 0x00020000
#define CM_CH0_INT_EN 0x00010000
@@ -328,6 +330,13 @@
#define CM_REG_CH0_FRAME2 0x84
#define CM_REG_CH1_FRAME1 0x88 /* 0-15: count of samples at bus master; buffer size */
#define CM_REG_CH1_FRAME2 0x8C /* 16-31: count of samples at codec; fragment size */
+#define CM_REG_MISC_CTRL_8768 0x92 /* reg. name the same as 0x18 */
+#define CM_CHB3D8C 0x20 /* 7.1 channels support */
+#define CM_SPD32FMT 0x10 /* SPDIF/IN 32k */
+#define CM_ADC2SPDIF 0x08 /* ADC output to SPDIF/OUT */
+#define CM_SHAREADC 0x04 /* DAC in ADC as Center/LFE */
+#define CM_REALTCMP 0x02 /* monitor the CMPL/CMPR of ADC */
+#define CM_INVLRCK 0x01 /* invert ZVPORT's LRCK */
/*
* size of i/o region
@@ -674,7 +683,7 @@
/*
*/
-static unsigned int hw_channels[] = {1, 2, 4, 5, 6};
+static unsigned int hw_channels[] = {1, 2, 4, 5, 6, 8};
static snd_pcm_hw_constraint_list_t hw_constraints_channels_4 = {
.count = 3,
.list = hw_channels,
@@ -685,6 +694,11 @@
.list = hw_channels,
.mask = 0,
};
+static snd_pcm_hw_constraint_list_t hw_constraints_channels_8 = {
+ .count = 6,
+ .list = hw_channels,
+ .mask = 0,
+};
static int set_dac_channels(cmipci_t *cm, cmipci_pcm_t *rec, int channels)
{
@@ -704,13 +718,20 @@
snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_CHB3D);
}
- if (channels == 6) {
+ if (channels >= 6) {
snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER);
} else {
snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER);
}
+ if (cm->chip_version == 68) {
+ if (channels == 8) {
+ snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL_8768, CM_CHB3D8C);
+ } else {
+ snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL_8768, CM_CHB3D8C);
+ }
+ }
spin_unlock_irq(&cm->reg_lock);
} else {
@@ -1504,6 +1525,7 @@
if ((err = open_device_check(cm, CM_OPEN_PLAYBACK, substream)) < 0)
return err;
runtime->hw = snd_cmipci_playback;
+ runtime->hw.channels_max = cm->max_channels;
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
cm->dig_pcm_status = cm->dig_status;
return 0;
@@ -1518,6 +1540,10 @@
if ((err = open_device_check(cm, CM_OPEN_CAPTURE, substream)) < 0)
return err;
runtime->hw = snd_cmipci_capture;
+ if (cm->chip_version == 68) { // 8768 only supports 44k/48k recording
+ runtime->hw.rate_min = 41000;
+ runtime->hw.rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
+ }
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
return 0;
}
@@ -1537,8 +1563,10 @@
runtime->hw.channels_max = cm->max_channels;
if (cm->max_channels == 4)
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_4);
- else
+ else if (cm->max_channels == 6)
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_6);
+ else if (cm->max_channels == 8)
+ snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_8);
}
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
}
@@ -2346,6 +2374,11 @@
spin_unlock_irq(&cm->reg_lock);
for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_mixers); idx++) {
+ if (cm->chip_version == 68) { // 8768 has no PCM volume
+ if (!strcmp(snd_cmipci_mixers[idx].name,
+ "PCM Playback Volume"))
+ continue;
+ }
if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cmipci_mixers[idx], cm))) < 0)
return err;
}
@@ -2496,21 +2529,29 @@
}
} else {
/* check reg 0Ch, bit 26 */
- if (detect & CM_CHIP_039) {
+ if (detect & CM_CHIP_8768) {
+ cm->chip_version = 68;
+ cm->max_channels = 8;
+ cm->can_ac3_hw = 1;
+ cm->has_dual_dac = 1;
+ cm->can_multi_ch = 1;
+ } else if (detect & CM_CHIP_055) {
+ cm->chip_version = 55;
+ cm->max_channels = 6;
+ cm->can_ac3_hw = 1;
+ cm->has_dual_dac = 1;
+ cm->can_multi_ch = 1;
+ } else if (detect & CM_CHIP_039) {
cm->chip_version = 39;
- if (detect & CM_CHIP_039_6CH)
- cm->max_channels = 6;
+ if (detect & CM_CHIP_039_6CH) /* 4 or 6 channels */
+ cm->max_channels = 6;
else
cm->max_channels = 4;
cm->can_ac3_hw = 1;
cm->has_dual_dac = 1;
cm->can_multi_ch = 1;
} else {
- cm->chip_version = 55; /* 4 or 6 channels */
- cm->max_channels = 6;
- cm->can_ac3_hw = 1;
- cm->has_dual_dac = 1;
- cm->can_multi_ch = 1;
+ printk(KERN_ERR "chip %x version not supported\n", detect);
}
}
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: CMI8768 patch
2005-02-17 22:11 CMI8768 patch "Tien, C.L. - 田承禮"
@ 2005-02-18 10:27 ` Takashi Iwai
2005-02-18 10:58 ` Takashi Iwai
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2005-02-18 10:27 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
At Fri, 18 Feb 2005 06:11:03 +0800,
Tien, C.L. wrote:
>
> Hi,
>
> I made a patch for CM8768, which has the same PCI ID but there are
> several HW diffecece, aas listed:
>
> 1. 8768 has no PCM volume control.
> 2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
> 3. 8768 can support up to 8 channels.
>
> I made change for item 2 and 3, I want to use the softvol plugin but
> don't know how to. The driver just don't generate the PCM volume slider
> for now.
Thanks for the patch. It looks fine.
Could you provide a "Signed-off-by" line to keep your credit in
changelog, such as
Signed-off-by: Foo Bar <foo@bar.com>
This is required to submit to linux-kernel.
thanks,
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: CMI8768 patch
2005-02-17 22:11 CMI8768 patch "Tien, C.L. - 田承禮"
2005-02-18 10:27 ` Takashi Iwai
@ 2005-02-18 10:58 ` Takashi Iwai
2005-02-19 5:07 ` CMI8768 patch, CMI9761A thomas schorpp
2005-02-19 7:43 ` CMI8768 patch, softvol mixer slider thomas schorpp
3 siblings, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2005-02-18 10:58 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
At Fri, 18 Feb 2005 06:11:03 +0800,
Tien, C.L. wrote:
>
> 1. 8768 has no PCM volume control.
> 2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
> 3. 8768 can support up to 8 channels.
>
> I made change for item 2 and 3, I want to use the softvol plugin but
> don't know how to. The driver just don't generate the PCM volume slider
> for now.
Regarding the softvol:
Could you try the config below? Copy it to /usr/share/alsa/cards.
And run once like "aplay foo.wav". Then PCM volume should appear.
Takashi
[-- Attachment #2: CMI8738-MC8.conf --]
[-- Type: application/octet-stream, Size: 2302 bytes --]
#
# Configuration for the CMI8768 chip with 8 multi-channel support
#
<confdir:pcm/front.conf>
CMI8738-MC8.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
# default with dmix+softvol & dsnoop
CMI8738-MC8.pcm.default {
@args [ CARD ]
@args.CARD {
type integer
}
type asym
playback.pcm {
type plug
slave.pcm {
type softvol
slave.pcm {
@func concat
strings [ "dmix:" $CARD ]
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}
capture.pcm {
type plug
slave.pcm {
@func concat
strings [ "dsnoop:" $CARD ]
}
}
}
<confdir:pcm/rear.conf>
# 2nd DAC
CMI8738-MC8.pcm.rear.0 {
@args [ CARD ]
@args.CARD {
type string
}
type softvol
slave.pcm {
type hw
card $CARD
device 1
}
control {
name "PCM Playback Volume"
card $CARD
}
}
<confdir:pcm/surround40.conf>
CMI8738-MC8.pcm.surround40.0 {
@args [ CARD ]
@args.CARD {
type string
}
type softvol
slave.pcm {
type hooks
slave.pcm {
type hw
card $CARD
device 1
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Four Channel Mode"
lock true
preserve true
value false
}
]
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
<confdir:pcm/surround41.conf>
<confdir:pcm/surround50.conf>
<confdir:pcm/surround51.conf>
CMI8738-MC8.pcm.surround51.0 "cards.CMI8738-MC8.pcm.surround40.0"
<confdir:pcm/surround71.conf>
CMI8738-MC8.pcm.surround71.0 "cards.CMI8738-MC8.pcm.surround40.0"
<confdir:pcm/iec958.conf>
CMI8738-MC8.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
type asym
playback.pcm {
type hooks
slave.pcm {
type hw
card $CARD
device 2
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
name "IEC958 Playback PCM Stream"
device 2
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
name "IEC958 Loop"
lock true
preserve true
value off
}
]
}
}
capture.pcm {
type hw
card $CARD
device 2
}
}
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: CMI8768 patch, CMI9761A
2005-02-17 22:11 CMI8768 patch "Tien, C.L. - 田承禮"
2005-02-18 10:27 ` Takashi Iwai
2005-02-18 10:58 ` Takashi Iwai
@ 2005-02-19 5:07 ` thomas schorpp
2005-02-19 7:43 ` CMI8768 patch, softvol mixer slider thomas schorpp
3 siblings, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2005-02-19 5:07 UTC (permalink / raw)
To: alsa-devel
hi,
Tien, C.L. - 田承禮 wrote:
> Hi,
>
> I made a patch for CM8768, which has the same PCI ID but there are
> several HW diffecece, aas listed:
same with the 9761A i assume?
>
> 1. 8768 has no PCM volume control.
all model policy? strange cost optimation, driver software should be
more expensive... for customers.
> 2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
> 3. 8768 can support up to 8 channels.
>
> I made change for item 2 and 3, I want to use the softvol plugin but
> don't know how to. The driver just don't generate the PCM volume slider
> for now.
i want it too and at least 2 dxs sliders. so i could play loud mp3
without getting my speakers blown by knotify beeps.
lee stated, it cant be used by apps needing oss-mixer. anyway. most
newer apps like xine + xmms have conf options for using alsa or oss.
>
> The patch file is attached.
>
> Sincerely,
> ChenLi Tien
>
>
y
tom
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: CMI8768 patch, softvol mixer slider
2005-02-17 22:11 CMI8768 patch "Tien, C.L. - 田承禮"
` (2 preceding siblings ...)
2005-02-19 5:07 ` CMI8768 patch, CMI9761A thomas schorpp
@ 2005-02-19 7:43 ` thomas schorpp
2005-02-19 7:56 ` Lee Revell
3 siblings, 1 reply; 11+ messages in thread
From: thomas schorpp @ 2005-02-19 7:43 UTC (permalink / raw)
To: alsa-devel
Tien, C.L. - 田承禮 wrote:
> Hi,
>
> I made a patch for CM8768, which has the same PCI ID but there are
> several HW diffecece, aas listed:
>
> 1. 8768 has no PCM volume control.
> 2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
> 3. 8768 can support up to 8 channels.
>
> I made change for item 2 and 3, I want to use the softvol plugin but
> don't know how to. The driver just don't generate the PCM volume slider
> for now.
hmm, if read the docs right its userspace.
how about getting it in the kernel and calling it snd_x_csoftmix ?
heres a plugin builder PCM_PLUGIN_H
softvol from userpaces lib adapted implemented in ../core/oss/softvol.c
then?
and we would need a control definition used then by snd_ctl_new1()
the mixer build() s must determine then between real and soft controls...
>
> The patch file is attached.
>
> Sincerely,
> ChenLi Tien
>
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: CMI8768 patch, softvol mixer slider
2005-02-19 7:43 ` CMI8768 patch, softvol mixer slider thomas schorpp
@ 2005-02-19 7:56 ` Lee Revell
2005-02-19 18:40 ` thomas schorpp
0 siblings, 1 reply; 11+ messages in thread
From: Lee Revell @ 2005-02-19 7:56 UTC (permalink / raw)
To: t.schorpp; +Cc: alsa-devel
On Sat, 2005-02-19 at 08:43 +0100, thomas schorpp wrote:
> hmm, if read the docs right its userspace.
>
> how about getting it in the kernel and calling it snd_x_csoftmix ?
Why? It works fine in userspace. The whole point of alsa-lib is to get
things like software volume control and mixing and sample rate
conversion that don't need to be in the kernel out of the kernel.
Lee
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: CMI8768 patch, softvol mixer slider
2005-02-19 7:56 ` Lee Revell
@ 2005-02-19 18:40 ` thomas schorpp
2005-02-19 19:11 ` Lee Revell
0 siblings, 1 reply; 11+ messages in thread
From: thomas schorpp @ 2005-02-19 18:40 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel
Lee Revell wrote:
> On Sat, 2005-02-19 at 08:43 +0100, thomas schorpp wrote:
>
>>hmm, if read the docs right its userspace.
>>
>>how about getting it in the kernel and calling it snd_x_csoftmix ?
>
>
> Why? It works fine in userspace.
surely.
> The whole point of alsa-lib is to get
> things like software volume control and mixing and sample rate
> conversion that don't need to be in the kernel out of the kernel.
who decides on "need"?
1. sw engineering reuseability:
would you provide a base class without a generalizable feature requiring
every subclass implementing it? wheres the need for specialization here?
2. the linux audio developers:
"guys, theres no pcm master to access with the alsa driver on some cards
on the mixers. everone of us must implement it now in our apps, what a
hell work."
3. audio professionals and simple end user
"guys, i heard therere some great apps like ardour and multi-channel
realtime audio available on linux at low cost. lets go and save much
costs, buy this great suse and have fun. ... eh? wheres the pcm slider i
have with windows gone? they cant even provide that? ... so the other
apps cant be much. lets boot windows again and forget this suse..."
4. the linux kernel developers?
>
> Lee
>
>
tom
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: CMI8768 patch, softvol mixer slider
2005-02-19 18:40 ` thomas schorpp
@ 2005-02-19 19:11 ` Lee Revell
2005-02-19 21:08 ` softvol plugin thomas schorpp
0 siblings, 1 reply; 11+ messages in thread
From: Lee Revell @ 2005-02-19 19:11 UTC (permalink / raw)
To: t.schorpp; +Cc: alsa-devel
On Sat, 2005-02-19 at 19:40 +0100, thomas schorpp wrote:
> > The whole point of alsa-lib is to get
> > things like software volume control and mixing and sample rate
> > conversion that don't need to be in the kernel out of the kernel.
>
> who decides on "need"?
>
> 1. sw engineering reuseability:
>
> would you provide a base class without a generalizable feature requiring
> every subclass implementing it? wheres the need for specialization here?
>
> 2. the linux audio developers:
>
> "guys, theres no pcm master to access with the alsa driver on some cards
> on the mixers. everone of us must implement it now in our apps, what a
> hell work."
>
> 3. audio professionals and simple end user
>
> "guys, i heard therere some great apps like ardour and multi-channel
> realtime audio available on linux at low cost. lets go and save much
> costs, buy this great suse and have fun. ... eh? wheres the pcm slider i
> have with windows gone? they cant even provide that? ... so the other
> apps cant be much. lets boot windows again and forget this suse..."
>
> 4. the linux kernel developers?
I think you missed my point. There is a PCM slider for cards with no
hardware volume control. It's provided by the softvol plugin, which is
part of alsa-lib, which lives in userspace. Since it works fine in
userspace, there's no reason for it to be in the kernel, other than to
provide software volume control for OSS apps using the in-kernel OSS
emulation. The OSS API is deprecated, so there's no way the kernel
developers will bloat the kernel by letting in software volume control
for the sole purpose of supporting a deprecated API.
Also keep in mind we are talking about the cheapest of the cheap
hardware. They are probably saving a penny or two per board, by wasting
everyone's CPU cycles to do volume control in software. The actual fix
is to get a real sound card.
Lee
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: softvol plugin
2005-02-19 19:11 ` Lee Revell
@ 2005-02-19 21:08 ` thomas schorpp
2005-02-19 21:12 ` Lee Revell
0 siblings, 1 reply; 11+ messages in thread
From: thomas schorpp @ 2005-02-19 21:08 UTC (permalink / raw)
To: alsa-devel
Lee Revell wrote:
> On Sat, 2005-02-19 at 19:40 +0100, thomas schorpp wrote:
>
>
>
> I think you missed my point. There is a PCM slider for cards with no
> hardware volume control. It's provided by the softvol plugin, which is
> part of alsa-lib, which lives in userspace. Since it works fine in
> userspace, there's no reason for it to be in the kernel, other than to
> provide software volume control for OSS apps using the in-kernel OSS
> emulation. The OSS API is deprecated, so there's no way the kernel
> developers will bloat the kernel by letting in software volume control
> for the sole purpose of supporting a deprecated API.
yes, agree.
ill check my installation.
schorpp@tom1:~$ dpkg -l alsa* |grep 1.0.8
ii alsa-base 1.0.8-5 ALSA driver configuration files
ii alsa-oss 1.0.8-1 ALSA wrapper for OSS applications
ii alsa-utils 1.0.8-2 ALSA utilities
schorpp@tom1:~$
schorpp@tom1:~$ dpkg -l libasound* |grep 1.0.8
ii libasound2 1.0.8-2 ALSA library
ii libasound2-dev 1.0.8-2 ALSA library development files
ii libasound2-doc 1.0.8-2 ALSA library developer documentation
ii libasound2-plu 1.0.8-2 ALSA library plugins
schorpp@tom1:~$
sorry, i cant get a pcm master slider on any mixer.
>
> Also keep in mind we are talking about the cheapest of the cheap
> hardware. They are probably saving a penny or two per board, by wasting
> everyone's CPU cycles to do volume control in software. The actual fix
> is to get a real sound card.
fine then.
>
> Lee
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: softvol plugin
2005-02-19 21:08 ` softvol plugin thomas schorpp
@ 2005-02-19 21:12 ` Lee Revell
2005-02-20 21:03 ` thomas schorpp
0 siblings, 1 reply; 11+ messages in thread
From: Lee Revell @ 2005-02-19 21:12 UTC (permalink / raw)
To: t.schorpp; +Cc: alsa-devel
On Sat, 2005-02-19 at 22:08 +0100, thomas schorpp wrote:
> sorry, i cant get a pcm master slider on any mixer.
>
OK, that's a separate issue (a bug). All I was saying is that it's not
a reason to put anything in the kernel.
Lee
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: softvol plugin
2005-02-19 21:12 ` Lee Revell
@ 2005-02-20 21:03 ` thomas schorpp
0 siblings, 0 replies; 11+ messages in thread
From: thomas schorpp @ 2005-02-20 21:03 UTC (permalink / raw)
To: alsa-devel
Lee Revell wrote:
> On Sat, 2005-02-19 at 22:08 +0100, thomas schorpp wrote:
>
>>sorry, i cant get a pcm master slider on any mixer.
mmh, ok, im satisfied with 4 dxs channel sliders and no pcm master.
no more practical need for pcm master for me.
and xmmms has the softvol in, yet.
BTW, i got a CMedia 8738 - 5.1 CH pci, if someone wants testing, drop me
a mail.
> OK, that's a separate issue (a bug). All I was saying is that it's not
> a reason to put anything in the kernel.
no bug. all right. thx.
.. i tried to give seperate names for the 4 DXS mixer ctls:
static int snd_via8233_init_misc(via82xx_t *chip, int dev)
{
int i, err, caps;
unsigned char val;
caps = chip->chip_type == TYPE_VIA8233A ? 1 : 2;
for (i = 0; i < caps; i++) {
snd_via8233_capture_source.index = i;
err = snd_ctl_add(chip->card,
snd_ctl_new1(&snd_via8233_capture_source, chip));
if (err < 0)
return err;
}
if (ac97_can_spdif(chip->ac97)) {
err = snd_ctl_add(chip->card,
snd_ctl_new1(&snd_via8233_dxs3_spdif_control, chip));
if (err < 0)
return err;
}
if (chip->chip_type != TYPE_VIA8233A) {
snd_via8233_dxs_volume_control.count = 1;
snd_via8233_dxs_volume_control.name = "PCM 1";
err = snd_ctl_add(chip->card,
snd_ctl_new1(&snd_via8233_dxs_volume_control, chip));
snd_via8233_dxs_volume_control.name = "PCM 2";
err = snd_ctl_add(chip->card,
snd_ctl_new1(&snd_via8233_dxs_volume_control, chip));
snd_via8233_dxs_volume_control.name = "PCM 3";
err = snd_ctl_add(chip->card,
snd_ctl_new1(&snd_via8233_dxs_volume_control, chip));
snd_via8233_dxs_volume_control.name = "PCM 4";
err = snd_ctl_add(chip->card,
snd_ctl_new1(&snd_via8233_dxs_volume_control, chip));
if (err < 0)
return err;
}
as expected they bound togehter then ;)
now i dont write several callbacks for every, is there a trick here?
this is little nebulous...
static int snd_via8233_dxs_volume_put(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol)
{
via82xx_t *chip = snd_kcontrol_chip(kcontrol);
unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id);
unsigned long port = chip->port + 0x10 * idx;
unsigned char val;
int i, change = 0;
for (i = 0; i < 2; i++) {
val = ucontrol->value.integer.value[i];
if (val > VIA_DXS_MAX_VOLUME)
val = VIA_DXS_MAX_VOLUME;
val = VIA_DXS_MAX_VOLUME - val;
change |= val != chip->playback_volume[idx][i];
if (change) {
chip->playback_volume[idx][i] = val;
outb(val, port + VIA_REG_OFS_PLAYBACK_VOLUME_L + i);
}
tom
>
> Lee
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-02-20 21:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-17 22:11 CMI8768 patch "Tien, C.L. - 田承禮"
2005-02-18 10:27 ` Takashi Iwai
2005-02-18 10:58 ` Takashi Iwai
2005-02-19 5:07 ` CMI8768 patch, CMI9761A thomas schorpp
2005-02-19 7:43 ` CMI8768 patch, softvol mixer slider thomas schorpp
2005-02-19 7:56 ` Lee Revell
2005-02-19 18:40 ` thomas schorpp
2005-02-19 19:11 ` Lee Revell
2005-02-19 21:08 ` softvol plugin thomas schorpp
2005-02-19 21:12 ` Lee Revell
2005-02-20 21:03 ` thomas schorpp
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.