Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
872b8f81
Commit
872b8f81
authored
Jan 13, 2005
by
Jaroslav Kysela
Browse files
Options
Browse Files
Download
Plain Diff
Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5
into suse.cz:/home/perex/bk/linux-sound/linux-sound
parents
be847405
a89a93e9
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
112 additions
and
127 deletions
+112
-127
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/sound/alsa/ALSA-Configuration.txt
+32
-22
include/sound/ac97_codec.h
include/sound/ac97_codec.h
+1
-0
include/sound/version.h
include/sound/version.h
+2
-2
sound/core/ioctl32/ioctl32.c
sound/core/ioctl32/ioctl32.c
+15
-74
sound/core/rawmidi.c
sound/core/rawmidi.c
+2
-2
sound/pci/ac97/ac97_codec.c
sound/pci/ac97/ac97_codec.c
+12
-4
sound/pci/ac97/ac97_patch.c
sound/pci/ac97/ac97_patch.c
+6
-3
sound/pci/atiixp.c
sound/pci/atiixp.c
+21
-15
sound/pci/ca0106/ca0106_mixer.c
sound/pci/ca0106/ca0106_mixer.c
+0
-1
sound/pci/ca0106/ca0106_proc.c
sound/pci/ca0106/ca0106_proc.c
+0
-1
sound/pci/intel8x0.c
sound/pci/intel8x0.c
+19
-1
sound/pci/mixart/mixart.c
sound/pci/mixart/mixart.c
+2
-2
No files found.
Documentation/sound/alsa/ALSA-Configuration.txt
View file @
872b8f81
...
@@ -184,6 +184,8 @@ Module parameters
...
@@ -184,6 +184,8 @@ Module parameters
Module for ATI IXP 150/200/250 AC97 controllers.
Module for ATI IXP 150/200/250 AC97 controllers.
ac97_clock - AC'97 clock (defalut = 48000)
ac97_clock - AC'97 clock (defalut = 48000)
ac97_quirk - AC'97 workaround for strange hardware
See the description of intel8x0 module for details.
spdif_aclink - S/PDIF transfer over AC-link (default = 1)
spdif_aclink - S/PDIF transfer over AC-link (default = 1)
This module supports up to 8 cards and autoprobe.
This module supports up to 8 cards and autoprobe.
...
@@ -680,14 +682,19 @@ Module parameters
...
@@ -680,14 +682,19 @@ Module parameters
* ALi m5455
* ALi m5455
ac97_clock - AC'97 codec clock base (0 = auto-detect)
ac97_clock - AC'97 codec clock base (0 = auto-detect)
ac97_quirk - AC'97 workaround for strange hardware (-1 = default)
ac97_quirk - AC'97 workaround for strange hardware
-1 = default, don't override
The following strings are accepted:
0 = disable
default = don't override the default setting
1 = use headphone control as master
disable = disable the quirk
2 = swap headphone and master controls
hp_only = use headphone control as master
3 = for AD1985, turn on OMS bit and use headphone
swap_hp = swap headphone and master controls
4 = for ALC65x, turn on the jack sense mode
swap_surround = swap master and surround controls
5 = inverted EAPD implementation
ad_shring = for AD1985, turn on OMS bit and use headphone
alc_jack = for ALC65x, turn on the jack sense mode
inv_eapd = inverted EAPD implementation
mute_led = bind EAPD bit for turning on/off mute LED
For backward compatibility, the corresponding integer
value -1, 0, ... are accepted, too.
buggy_irq - Enable workaround for buggy interrupts on some
buggy_irq - Enable workaround for buggy interrupts on some
motherboards (default off)
motherboards (default off)
...
@@ -1402,18 +1409,21 @@ In this example, the interwave card is always loaded as the first card
...
@@ -1402,18 +1409,21 @@ In this example, the interwave card is always loaded as the first card
ALSA PCM devices to OSS devices mapping
ALSA PCM devices to OSS devices mapping
=======================================
=======================================
/dev/snd/pcmC0D0 -> /dev/audio0 (/dev/audio) -> minor 4
/dev/snd/pcmC0D0[c|p] -> /dev/audio0 (/dev/audio) -> minor 4
/dev/snd/pcmC0D0 -> /dev/dsp0 (/dev/dsp) -> minor 3
/dev/snd/pcmC0D0[c|p] -> /dev/dsp0 (/dev/dsp) -> minor 3
/dev/snd/pcmC0D1 -> /dev/adsp0 (/dev/adsp) -> minor 12
/dev/snd/pcmC0D1[c|p] -> /dev/adsp0 (/dev/adsp) -> minor 12
/dev/snd/pcmC1D0 -> /dev/audio1 -> minor 4+16 = 20
/dev/snd/pcmC1D0[c|p] -> /dev/audio1 -> minor 4+16 = 20
/dev/snd/pcmC1D0 -> /dev/dsp1 -> minor 3+16 = 19
/dev/snd/pcmC1D0[c|p] -> /dev/dsp1 -> minor 3+16 = 19
/dev/snd/pcmC1D1 -> /dev/adsp1 -> minor 12+16 = 28
/dev/snd/pcmC1D1[c|p] -> /dev/adsp1 -> minor 12+16 = 28
/dev/snd/pcmC2D0 -> /dev/audio2 -> minor 4+32 = 36
/dev/snd/pcmC2D0[c|p] -> /dev/audio2 -> minor 4+32 = 36
/dev/snd/pcmC2D0 -> /dev/dsp2 -> minor 3+32 = 39
/dev/snd/pcmC2D0[c|p] -> /dev/dsp2 -> minor 3+32 = 39
/dev/snd/pcmC2D1 -> /dev/adsp2 -> minor 12+32 = 44
/dev/snd/pcmC2D1[c|p] -> /dev/adsp2 -> minor 12+32 = 44
The first number from /dev/snd/pcmC{X}D{Y} expression means soundcard number
The first number from /dev/snd/pcmC{X}D{Y}[c|p] expression means
and second means device number.
soundcard number and second means device number. The ALSA devices
have either 'c' or 'p' suffix indicating the direction, capture and
playback, respectively.
Please note that the device mapping above may be varied via the module
Please note that the device mapping above may be varied via the module
options of snd-pcm-oss module.
options of snd-pcm-oss module.
...
...
include/sound/ac97_codec.h
View file @
872b8f81
...
@@ -426,6 +426,7 @@ struct snd_ac97_build_ops {
...
@@ -426,6 +426,7 @@ struct snd_ac97_build_ops {
int
(
*
build_spdif
)
(
ac97_t
*
ac97
);
int
(
*
build_spdif
)
(
ac97_t
*
ac97
);
int
(
*
build_post_spdif
)
(
ac97_t
*
ac97
);
int
(
*
build_post_spdif
)
(
ac97_t
*
ac97
);
#ifdef CONFIG_PM
#ifdef CONFIG_PM
void
(
*
suspend
)
(
ac97_t
*
ac97
);
void
(
*
resume
)
(
ac97_t
*
ac97
);
void
(
*
resume
)
(
ac97_t
*
ac97
);
#endif
#endif
};
};
...
...
include/sound/version.h
View file @
872b8f81
/* include/version.h. Generated by configure. */
/* include/version.h. Generated by configure. */
#define CONFIG_SND_VERSION "1.0.8
rc2
"
#define CONFIG_SND_VERSION "1.0.8"
#define CONFIG_SND_DATE " (
Wed Jan 05 06:44:40
2005 UTC)"
#define CONFIG_SND_DATE " (
Thu Jan 13 09:39:32
2005 UTC)"
sound/core/ioctl32/ioctl32.c
View file @
872b8f81
...
@@ -219,25 +219,10 @@ struct sndrv_ctl_elem_value32 {
...
@@ -219,25 +219,10 @@ struct sndrv_ctl_elem_value32 {
struct
sndrv_ctl_elem_id
id
;
struct
sndrv_ctl_elem_id
id
;
unsigned
int
indirect
;
/* bit-field causes misalignment */
unsigned
int
indirect
;
/* bit-field causes misalignment */
union
{
union
{
union
{
s32
integer
[
128
];
/* integer and boolean need conversion */
s32
value
[
128
];
unsigned
char
data
[
512
];
/* others should be compatible */
u32
value_ptr
;
}
integer
;
union
{
s64
value
[
64
];
u32
value_ptr
;
}
integer64
;
union
{
u32
item
[
128
];
u32
item_ptr
;
}
enumerated
;
union
{
unsigned
char
data
[
512
];
u32
data_ptr
;
}
bytes
;
struct
sndrv_aes_iec958
iec958
;
}
value
;
}
value
;
unsigned
char
reserved
[
128
];
unsigned
char
reserved
[
128
];
/* not used */
};
};
...
@@ -269,7 +254,7 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
...
@@ -269,7 +254,7 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
struct
sndrv_ctl_elem_value
*
data
;
struct
sndrv_ctl_elem_value
*
data
;
struct
sndrv_ctl_elem_value32
__user
*
data32
;
struct
sndrv_ctl_elem_value32
__user
*
data32
;
snd_ctl_file_t
*
ctl
;
snd_ctl_file_t
*
ctl
;
int
err
,
i
;
int
err
,
i
,
indirect
;
int
type
;
int
type
;
/* sanity check */
/* sanity check */
...
@@ -281,7 +266,7 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
...
@@ -281,7 +266,7 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
return
-
ENOTTY
;
return
-
ENOTTY
;
data32
=
compat_ptr
(
arg
);
data32
=
compat_ptr
(
arg
);
data
=
k
malloc
(
sizeof
(
*
data
),
GFP_KERNEL
);
data
=
k
calloc
(
1
,
sizeof
(
*
data
),
GFP_KERNEL
);
if
(
data
==
NULL
)
if
(
data
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -289,12 +274,12 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
...
@@ -289,12 +274,12 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
err
=
-
EFAULT
;
err
=
-
EFAULT
;
goto
__end
;
goto
__end
;
}
}
if
(
__get_user
(
data
->
indirect
,
&
data32
->
indirect
))
{
if
(
__get_user
(
indirect
,
&
data32
->
indirect
))
{
err
=
-
EFAULT
;
err
=
-
EFAULT
;
goto
__end
;
goto
__end
;
}
}
/* FIXME: indirect access is not supported */
/* FIXME: indirect access is not supported */
if
(
data
->
indirect
)
{
if
(
indirect
)
{
err
=
-
EINVAL
;
err
=
-
EINVAL
;
goto
__end
;
goto
__end
;
}
}
...
@@ -309,7 +294,7 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
...
@@ -309,7 +294,7 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
case
SNDRV_CTL_ELEM_TYPE_INTEGER
:
case
SNDRV_CTL_ELEM_TYPE_INTEGER
:
for
(
i
=
0
;
i
<
128
;
i
++
)
{
for
(
i
=
0
;
i
<
128
;
i
++
)
{
int
val
;
int
val
;
if
(
__get_user
(
val
,
&
data32
->
value
.
integer
.
value
[
i
]))
{
if
(
__get_user
(
val
,
&
data32
->
value
.
integer
[
i
]))
{
err
=
-
EFAULT
;
err
=
-
EFAULT
;
goto
__end
;
goto
__end
;
}
}
...
@@ -317,33 +302,12 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
...
@@ -317,33 +302,12 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
}
}
break
;
break
;
case
SNDRV_CTL_ELEM_TYPE_INTEGER64
:
case
SNDRV_CTL_ELEM_TYPE_INTEGER64
:
if
(
__copy_from_user
(
data
->
value
.
integer64
.
value
,
data32
->
value
.
integer64
.
value
,
sizeof
(
data
->
value
.
integer64
.
value
)))
{
err
=
-
EFAULT
;
goto
__end
;
}
break
;
case
SNDRV_CTL_ELEM_TYPE_ENUMERATED
:
case
SNDRV_CTL_ELEM_TYPE_ENUMERATED
:
if
(
__copy_from_user
(
data
->
value
.
enumerated
.
item
,
data32
->
value
.
enumerated
.
item
,
sizeof
(
data32
->
value
.
enumerated
.
item
)))
{
err
=
-
EFAULT
;
goto
__end
;
}
break
;
case
SNDRV_CTL_ELEM_TYPE_BYTES
:
case
SNDRV_CTL_ELEM_TYPE_BYTES
:
if
(
__copy_from_user
(
data
->
value
.
bytes
.
data
,
data32
->
value
.
bytes
.
data
,
sizeof
(
data32
->
value
.
bytes
.
data
)))
{
err
=
-
EFAULT
;
goto
__end
;
}
break
;
case
SNDRV_CTL_ELEM_TYPE_IEC958
:
case
SNDRV_CTL_ELEM_TYPE_IEC958
:
if
(
__copy_from_user
(
&
data
->
value
.
iec958
,
if
(
__copy_from_user
(
data
->
value
.
bytes
.
data
,
&
data32
->
value
.
iec958
,
data32
->
value
.
data
,
sizeof
(
data32
->
value
.
iec958
)))
{
sizeof
(
data32
->
value
.
data
)))
{
err
=
-
EFAULT
;
err
=
-
EFAULT
;
goto
__end
;
goto
__end
;
}
}
...
@@ -367,43 +331,20 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
...
@@ -367,43 +331,20 @@ static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd,
for
(
i
=
0
;
i
<
128
;
i
++
)
{
for
(
i
=
0
;
i
<
128
;
i
++
)
{
int
val
;
int
val
;
val
=
data
->
value
.
integer
.
value
[
i
];
val
=
data
->
value
.
integer
.
value
[
i
];
if
(
__put_user
(
val
,
&
data32
->
value
.
integer
.
value
[
i
]))
{
if
(
__put_user
(
val
,
&
data32
->
value
.
integer
[
i
]))
{
err
=
-
EFAULT
;
err
=
-
EFAULT
;
goto
__end
;
goto
__end
;
}
}
}
}
break
;
break
;
case
SNDRV_CTL_ELEM_TYPE_INTEGER64
:
default:
if
(
__copy_to_user
(
data32
->
value
.
integer64
.
value
,
if
(
__copy_to_user
(
data32
->
value
.
data
,
data
->
value
.
integer64
.
value
,
sizeof
(
data32
->
value
.
integer64
.
value
)))
{
err
=
-
EFAULT
;
goto
__end
;
}
break
;
case
SNDRV_CTL_ELEM_TYPE_ENUMERATED
:
if
(
__copy_to_user
(
data32
->
value
.
enumerated
.
item
,
data
->
value
.
enumerated
.
item
,
sizeof
(
data32
->
value
.
enumerated
.
item
)))
{
err
=
-
EFAULT
;
goto
__end
;
}
break
;
case
SNDRV_CTL_ELEM_TYPE_BYTES
:
if
(
__copy_to_user
(
data32
->
value
.
bytes
.
data
,
data
->
value
.
bytes
.
data
,
data
->
value
.
bytes
.
data
,
sizeof
(
data32
->
value
.
bytes
.
data
)))
{
sizeof
(
data32
->
value
.
data
)))
{
err
=
-
EFAULT
;
err
=
-
EFAULT
;
goto
__end
;
goto
__end
;
}
}
break
;
break
;
case
SNDRV_CTL_ELEM_TYPE_IEC958
:
if
(
__copy_to_user
(
&
data32
->
value
.
iec958
,
&
data
->
value
.
iec958
,
sizeof
(
data32
->
value
.
iec958
)))
{
err
=
-
EFAULT
;
goto
__end
;
}
break
;
break
;
}
}
err
=
0
;
err
=
0
;
...
...
sound/core/rawmidi.c
View file @
872b8f81
...
@@ -747,7 +747,7 @@ static inline int _snd_rawmidi_ioctl(struct inode *inode, struct file *file,
...
@@ -747,7 +747,7 @@ static inline int _snd_rawmidi_ioctl(struct inode *inode, struct file *file,
case
SNDRV_RAWMIDI_IOCTL_DROP
:
case
SNDRV_RAWMIDI_IOCTL_DROP
:
{
{
int
val
;
int
val
;
if
(
get_user
(
val
,
(
long
__user
*
)
argp
))
if
(
get_user
(
val
,
(
int
__user
*
)
argp
))
return
-
EFAULT
;
return
-
EFAULT
;
switch
(
val
)
{
switch
(
val
)
{
case
SNDRV_RAWMIDI_STREAM_OUTPUT
:
case
SNDRV_RAWMIDI_STREAM_OUTPUT
:
...
@@ -761,7 +761,7 @@ static inline int _snd_rawmidi_ioctl(struct inode *inode, struct file *file,
...
@@ -761,7 +761,7 @@ static inline int _snd_rawmidi_ioctl(struct inode *inode, struct file *file,
case
SNDRV_RAWMIDI_IOCTL_DRAIN
:
case
SNDRV_RAWMIDI_IOCTL_DRAIN
:
{
{
int
val
;
int
val
;
if
(
get_user
(
val
,
(
long
__user
*
)
argp
))
if
(
get_user
(
val
,
(
int
__user
*
)
argp
))
return
-
EFAULT
;
return
-
EFAULT
;
switch
(
val
)
{
switch
(
val
)
{
case
SNDRV_RAWMIDI_STREAM_OUTPUT
:
case
SNDRV_RAWMIDI_STREAM_OUTPUT
:
...
...
sound/pci/ac97/ac97_codec.c
View file @
872b8f81
...
@@ -1505,7 +1505,7 @@ static int snd_ac97_mixer_build(ac97_t * ac97)
...
@@ -1505,7 +1505,7 @@ static int snd_ac97_mixer_build(ac97_t * ac97)
snd_ac97_update_bits
(
ac97
,
AC97_GENERAL_PURPOSE
,
~
AC97_GP_DRSS_MASK
,
0x0000
);
snd_ac97_update_bits
(
ac97
,
AC97_GENERAL_PURPOSE
,
~
AC97_GP_DRSS_MASK
,
0x0000
);
/* build 3D controls */
/* build 3D controls */
if
(
ac97
->
build_ops
&&
ac97
->
build_ops
->
build_3d
)
{
if
(
ac97
->
build_ops
->
build_3d
)
{
ac97
->
build_ops
->
build_3d
(
ac97
);
ac97
->
build_ops
->
build_3d
(
ac97
);
}
else
{
}
else
{
if
(
snd_ac97_try_volume_mix
(
ac97
,
AC97_3D_CONTROL
))
{
if
(
snd_ac97_try_volume_mix
(
ac97
,
AC97_3D_CONTROL
))
{
...
@@ -1528,14 +1528,14 @@ static int snd_ac97_mixer_build(ac97_t * ac97)
...
@@ -1528,14 +1528,14 @@ static int snd_ac97_mixer_build(ac97_t * ac97)
/* build S/PDIF controls */
/* build S/PDIF controls */
if
(
ac97
->
ext_id
&
AC97_EI_SPDIF
)
{
if
(
ac97
->
ext_id
&
AC97_EI_SPDIF
)
{
if
(
ac97
->
build_ops
&&
ac97
->
build_ops
->
build_spdif
)
{
if
(
ac97
->
build_ops
->
build_spdif
)
{
if
((
err
=
ac97
->
build_ops
->
build_spdif
(
ac97
))
<
0
)
if
((
err
=
ac97
->
build_ops
->
build_spdif
(
ac97
))
<
0
)
return
err
;
return
err
;
}
else
{
}
else
{
for
(
idx
=
0
;
idx
<
5
;
idx
++
)
for
(
idx
=
0
;
idx
<
5
;
idx
++
)
if
((
err
=
snd_ctl_add
(
card
,
snd_ac97_cnew
(
&
snd_ac97_controls_spdif
[
idx
],
ac97
)))
<
0
)
if
((
err
=
snd_ctl_add
(
card
,
snd_ac97_cnew
(
&
snd_ac97_controls_spdif
[
idx
],
ac97
)))
<
0
)
return
err
;
return
err
;
if
(
ac97
->
build_ops
&&
ac97
->
build_ops
->
build_post_spdif
)
{
if
(
ac97
->
build_ops
->
build_post_spdif
)
{
if
((
err
=
ac97
->
build_ops
->
build_post_spdif
(
ac97
))
<
0
)
if
((
err
=
ac97
->
build_ops
->
build_post_spdif
(
ac97
))
<
0
)
return
err
;
return
err
;
}
}
...
@@ -1548,7 +1548,7 @@ static int snd_ac97_mixer_build(ac97_t * ac97)
...
@@ -1548,7 +1548,7 @@ static int snd_ac97_mixer_build(ac97_t * ac97)
}
}
/* build chip specific controls */
/* build chip specific controls */
if
(
ac97
->
build_ops
&&
ac97
->
build_ops
->
build_specific
)
if
(
ac97
->
build_ops
->
build_specific
)
if
((
err
=
ac97
->
build_ops
->
build_specific
(
ac97
))
<
0
)
if
((
err
=
ac97
->
build_ops
->
build_specific
(
ac97
))
<
0
)
return
err
;
return
err
;
...
@@ -1811,6 +1811,9 @@ int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops,
...
@@ -1811,6 +1811,9 @@ int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops,
return
0
;
return
0
;
}
}
/* build_ops to do nothing */
static
struct
snd_ac97_build_ops
null_build_ops
;
/**
/**
* snd_ac97_mixer - create an Codec97 component
* snd_ac97_mixer - create an Codec97 component
* @bus: the AC97 bus which codec is attached to
* @bus: the AC97 bus which codec is attached to
...
@@ -2050,6 +2053,9 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
...
@@ -2050,6 +2053,9 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
bus
->
ops
->
init
(
ac97
);
bus
->
ops
->
init
(
ac97
);
snd_ac97_get_name
(
ac97
,
ac97
->
id
,
name
,
!
ac97_is_audio
(
ac97
));
snd_ac97_get_name
(
ac97
,
ac97
->
id
,
name
,
!
ac97_is_audio
(
ac97
));
snd_ac97_get_name
(
NULL
,
ac97
->
id
,
name
,
!
ac97_is_audio
(
ac97
));
// ac97->id might be changed in the special setup code
snd_ac97_get_name
(
NULL
,
ac97
->
id
,
name
,
!
ac97_is_audio
(
ac97
));
// ac97->id might be changed in the special setup code
if
(
!
ac97
->
build_ops
)
ac97
->
build_ops
=
&
null_build_ops
;
if
(
ac97_is_audio
(
ac97
))
{
if
(
ac97_is_audio
(
ac97
))
{
char
comp
[
16
];
char
comp
[
16
];
if
(
card
->
mixername
[
0
]
==
'\0'
)
{
if
(
card
->
mixername
[
0
]
==
'\0'
)
{
...
@@ -2157,6 +2163,8 @@ static void snd_ac97_powerdown(ac97_t *ac97)
...
@@ -2157,6 +2163,8 @@ static void snd_ac97_powerdown(ac97_t *ac97)
*/
*/
void
snd_ac97_suspend
(
ac97_t
*
ac97
)
void
snd_ac97_suspend
(
ac97_t
*
ac97
)
{
{
if
(
ac97
->
build_ops
->
suspend
)
ac97
->
build_ops
->
suspend
(
ac97
);
snd_ac97_powerdown
(
ac97
);
snd_ac97_powerdown
(
ac97
);
}
}
...
...
sound/pci/ac97/ac97_patch.c
View file @
872b8f81
...
@@ -910,7 +910,7 @@ static void patch_ad1881_chained(ac97_t * ac97, int unchained_idx, int cidx1, in
...
@@ -910,7 +910,7 @@ static void patch_ad1881_chained(ac97_t * ac97, int unchained_idx, int cidx1, in
static
struct
snd_ac97_build_ops
patch_ad1881_build_ops
=
{
static
struct
snd_ac97_build_ops
patch_ad1881_build_ops
=
{
#ifdef CONFIG_PM
#ifdef CONFIG_PM
.
resume
=
&
ad18xx_resume
.
resume
=
ad18xx_resume
#endif
#endif
};
};
...
@@ -993,7 +993,7 @@ static int patch_ad1885_specific(ac97_t * ac97)
...
@@ -993,7 +993,7 @@ static int patch_ad1885_specific(ac97_t * ac97)
static
struct
snd_ac97_build_ops
patch_ad1885_build_ops
=
{
static
struct
snd_ac97_build_ops
patch_ad1885_build_ops
=
{
.
build_specific
=
&
patch_ad1885_specific
,
.
build_specific
=
&
patch_ad1885_specific
,
#ifdef CONFIG_PM
#ifdef CONFIG_PM
.
resume
=
&
ad18xx_resume
.
resume
=
ad18xx_resume
#endif
#endif
};
};
...
@@ -1605,7 +1605,10 @@ int patch_alc655(ac97_t * ac97)
...
@@ -1605,7 +1605,10 @@ int patch_alc655(ac97_t * ac97)
/* adjust default values */
/* adjust default values */
val
=
snd_ac97_read
(
ac97
,
0x7a
);
/* misc control */
val
=
snd_ac97_read
(
ac97
,
0x7a
);
/* misc control */
val
|=
(
1
<<
1
);
/* spdif input pin */
if
(
ac97
->
id
==
0x414c4780
)
/* ALC658 */
val
&=
~
(
1
<<
1
);
/* Pin 47 is spdif input pin */
else
/* ALC655 */
val
|=
(
1
<<
1
);
/* Pin 47 is spdif input pin */
val
&=
~
(
1
<<
12
);
/* vref enable */
val
&=
~
(
1
<<
12
);
/* vref enable */
snd_ac97_write_cache
(
ac97
,
0x7a
,
val
);
snd_ac97_write_cache
(
ac97
,
0x7a
,
val
);
/* set default: spdif-in enabled,
/* set default: spdif-in enabled,
...
...
sound/pci/atiixp.c
View file @
872b8f81
...
@@ -43,6 +43,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
...
@@ -43,6 +43,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static
char
*
id
[
SNDRV_CARDS
]
=
SNDRV_DEFAULT_STR
;
/* ID for this card */
static
char
*
id
[
SNDRV_CARDS
]
=
SNDRV_DEFAULT_STR
;
/* ID for this card */
static
int
enable
[
SNDRV_CARDS
]
=
SNDRV_DEFAULT_ENABLE_PNP
;
/* Enable this card */
static
int
enable
[
SNDRV_CARDS
]
=
SNDRV_DEFAULT_ENABLE_PNP
;
/* Enable this card */
static
int
ac97_clock
[
SNDRV_CARDS
]
=
{[
0
...
(
SNDRV_CARDS
-
1
)]
=
48000
};
static
int
ac97_clock
[
SNDRV_CARDS
]
=
{[
0
...
(
SNDRV_CARDS
-
1
)]
=
48000
};
static
char
*
ac97_quirk
[
SNDRV_CARDS
];
static
int
spdif_aclink
[
SNDRV_CARDS
]
=
{[
0
...
(
SNDRV_CARDS
-
1
)]
=
1
};
static
int
spdif_aclink
[
SNDRV_CARDS
]
=
{[
0
...
(
SNDRV_CARDS
-
1
)]
=
1
};
module_param_array
(
index
,
int
,
NULL
,
0444
);
module_param_array
(
index
,
int
,
NULL
,
0444
);
...
@@ -53,6 +54,8 @@ module_param_array(enable, bool, NULL, 0444);
...
@@ -53,6 +54,8 @@ module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC
(
enable
,
"Enable audio part of ATI IXP controller."
);
MODULE_PARM_DESC
(
enable
,
"Enable audio part of ATI IXP controller."
);
module_param_array
(
ac97_clock
,
int
,
NULL
,
0444
);
module_param_array
(
ac97_clock
,
int
,
NULL
,
0444
);
MODULE_PARM_DESC
(
ac97_clock
,
"AC'97 codec clock (default 48000Hz)."
);
MODULE_PARM_DESC
(
ac97_clock
,
"AC'97 codec clock (default 48000Hz)."
);
module_param_array
(
ac97_quirk
,
charp
,
NULL
,
0444
);
MODULE_PARM_DESC
(
ac97_quirk
,
"AC'97 workaround for strange hardware."
);
module_param_array
(
spdif_aclink
,
bool
,
NULL
,
0444
);
module_param_array
(
spdif_aclink
,
bool
,
NULL
,
0444
);
MODULE_PARM_DESC
(
spdif_aclink
,
"S/PDIF over AC-link."
);
MODULE_PARM_DESC
(
spdif_aclink
,
"S/PDIF over AC-link."
);
...
@@ -630,21 +633,20 @@ static snd_pcm_uframes_t snd_atiixp_pcm_pointer(snd_pcm_substream_t *substream)
...
@@ -630,21 +633,20 @@ static snd_pcm_uframes_t snd_atiixp_pcm_pointer(snd_pcm_substream_t *substream)
snd_pcm_runtime_t
*
runtime
=
substream
->
runtime
;
snd_pcm_runtime_t
*
runtime
=
substream
->
runtime
;
atiixp_dma_t
*
dma
=
(
atiixp_dma_t
*
)
runtime
->
private_data
;
atiixp_dma_t
*
dma
=
(
atiixp_dma_t
*
)
runtime
->
private_data
;
unsigned
int
curptr
;
unsigned
int
curptr
;
int
timeout
=
1000
;
spin_lock
(
&
chip
->
reg_lock
);
while
(
timeout
--
)
{
curptr
=
readl
(
chip
->
remap_addr
+
dma
->
ops
->
dt_cur
);
curptr
=
readl
(
chip
->
remap_addr
+
dma
->
ops
->
dt_cur
);
if
(
curptr
<
dma
->
buf_addr
)
{
if
(
curptr
<
dma
->
buf_addr
)
snd_printdd
(
"curptr = %x, base = %x
\n
"
,
curptr
,
dma
->
buf_addr
);
continue
;
curptr
=
0
;
}
else
{
curptr
-=
dma
->
buf_addr
;
curptr
-=
dma
->
buf_addr
;
if
(
curptr
>=
dma
->
buf_bytes
)
{
if
(
curptr
>=
dma
->
buf_bytes
)
snd_printdd
(
"curptr = %x, size = %x
\n
"
,
curptr
,
dma
->
buf_bytes
);
continue
;
curptr
=
0
;
}
}
spin_unlock
(
&
chip
->
reg_lock
);
return
bytes_to_frames
(
runtime
,
curptr
);
return
bytes_to_frames
(
runtime
,
curptr
);
}
snd_printd
(
"atiixp: invalid DMA pointer read 0x%x (buf=%x)
\n
"
,
readl
(
chip
->
remap_addr
+
dma
->
ops
->
dt_cur
),
dma
->
buf_addr
);
return
0
;
}
}
/*
/*
...
@@ -1329,7 +1331,11 @@ static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id, struct pt_regs *r
...
@@ -1329,7 +1331,11 @@ static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id, struct pt_regs *r
* ac97 mixer section
* ac97 mixer section
*/
*/
static
int
__devinit
snd_atiixp_mixer_new
(
atiixp_t
*
chip
,
int
clock
)
static
struct
ac97_quirk
ac97_quirks
[]
__devinitdata
=
{
{
}
/* terminator */
};
static
int
__devinit
snd_atiixp_mixer_new
(
atiixp_t
*
chip
,
int
clock
,
const
char
*
quirk_override
)
{
{
ac97_bus_t
*
pbus
;
ac97_bus_t
*
pbus
;
ac97_template_t
ac97
;
ac97_template_t
ac97
;
...
@@ -1376,7 +1382,7 @@ static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock)
...
@@ -1376,7 +1382,7 @@ static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
/* snd_ac97_tune_hardware(chip->ac97, ac97_quirks); */
snd_ac97_tune_hardware
(
chip
->
ac97
[
0
],
ac97_quirks
,
quirk_override
);
return
0
;
return
0
;
}
}
...
@@ -1569,7 +1575,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
...
@@ -1569,7 +1575,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
chip
->
spdif_over_aclink
=
spdif_aclink
[
dev
];
chip
->
spdif_over_aclink
=
spdif_aclink
[
dev
];
if
((
err
=
snd_atiixp_mixer_new
(
chip
,
ac97_clock
[
dev
]))
<
0
)
if
((
err
=
snd_atiixp_mixer_new
(
chip
,
ac97_clock
[
dev
]
,
ac97_quirk
[
dev
]
))
<
0
)
goto
__error
;
goto
__error
;
if
((
err
=
snd_atiixp_pcm_new
(
chip
))
<
0
)
if
((
err
=
snd_atiixp_pcm_new
(
chip
))
<
0
)
...
...
sound/pci/ca0106/ca0106_mixer.c
View file @
872b8f81
#define __NO_VERSION__
/*
/*
* Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
* Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
* Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
* Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
...
...
sound/pci/ca0106/ca0106_proc.c
View file @
872b8f81
#define __NO_VERSION__
/*
/*
* Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
* Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
* Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
* Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
...
...
sound/pci/intel8x0.c
View file @
872b8f81
...
@@ -1766,10 +1766,22 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
...
@@ -1766,10 +1766,22 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.
name
=
"Dell"
,
/* which model? AD1981B*/
.
name
=
"Dell"
,
/* which model? AD1981B*/
.
type
=
AC97_TUNE_HP_ONLY
.
type
=
AC97_TUNE_HP_ONLY
},
},
{
.
vendor
=
0x103c
,
.
device
=
0x006d
,
.
name
=
"HP zv5000"
,
.
type
=
AC97_TUNE_MUTE_LED
/*AD1981B*/
},
{
/* FIXME: which codec? */
{
/* FIXME: which codec? */
.
vendor
=
0x103c
,
.
vendor
=
0x103c
,
.
device
=
0x00c3
,
.
device
=
0x00c3
,
.
name
=
"Hewlett-Packard onboard"
,
.
name
=
"HP xw6000"
,
.
type
=
AC97_TUNE_HP_ONLY
},
{
.
vendor
=
0x103c
,
.
device
=
0x129d
,
.
name
=
"HP xw8000"
,
.
type
=
AC97_TUNE_HP_ONLY
.
type
=
AC97_TUNE_HP_ONLY
},
},
{
{
...
@@ -1784,6 +1796,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
...
@@ -1784,6 +1796,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.
name
=
"HP xw8200"
,
/* AD1981B*/
.
name
=
"HP xw8200"
,
/* AD1981B*/
.
type
=
AC97_TUNE_HP_ONLY
.
type
=
AC97_TUNE_HP_ONLY
},
},
{
.
vendor
=
0x103c
,
.
device
=
0x12f2
,
.
name
=
"HP xw6200"
,
.
type
=
AC97_TUNE_HP_ONLY
},
{
{
.
vendor
=
0x103c
,
.
vendor
=
0x103c
,
.
device
=
0x3008
,
.
device
=
0x3008
,
...
...
sound/pci/mixart/mixart.c
View file @
872b8f81
...
@@ -526,11 +526,11 @@ static int mixart_set_format(mixart_stream_t *stream, snd_pcm_format_t format)
...
@@ -526,11 +526,11 @@ static int mixart_set_format(mixart_stream_t *stream, snd_pcm_format_t format)
stream_param
.
sample_type
=
ST_INTEGER_24BE
;
stream_param
.
sample_type
=
ST_INTEGER_24BE
;
stream_param
.
sample_size
=
24
;
stream_param
.
sample_size
=
24
;
break
;
break
;
case
SNDRV_PCM_F
MTBI
T_FLOAT_LE
:
case
SNDRV_PCM_F
ORMA
T_FLOAT_LE
:
stream_param
.
sample_type
=
ST_FLOATING_POINT_32LE
;
stream_param
.
sample_type
=
ST_FLOATING_POINT_32LE
;
stream_param
.
sample_size
=
32
;
stream_param
.
sample_size
=
32
;
break
;
break
;
case
SNDRV_PCM_F
MTBI
T_FLOAT_BE
:
case
SNDRV_PCM_F
ORMA
T_FLOAT_BE
:
stream_param
.
sample_type
=
ST_FLOATING_POINT_32BE
;
stream_param
.
sample_type
=
ST_FLOATING_POINT_32BE
;
stream_param
.
sample_size
=
32
;
stream_param
.
sample_size
=
32
;
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment