From: Thomas Charbonnel <thomas@undata.org>
To: alsa-devel@lists.sourceforge.net, torger@ludd.luth.se
Subject: hdsp update
Date: Sun, 23 Nov 2003 18:21:01 +0100 [thread overview]
Message-ID: <3FC0EC7D.1010701@undata.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
Hi,
The attach patch fixes problems with speed modes for H9632 cards (many
thanks to Pentti Ala-Vannesluoma for testing the driver and helping
finding bugs), and the AutoSync mode issue (for all cards) reported by
Anders Torger at the end of september.
A new version of hdspmixer is also available here :
http://www.undata.org/~thomas/
It is mostly a bugfix release for H9632 users.
There is also a new version of hdspconf, but it only adds a .desktop
file and a nice icon (to bring it to par with the new hdspmixer), so
Takashi, feel free not to commit this one if you don't have much time :)
Thomas
[-- Attachment #2: hdsp.patch --]
[-- Type: text/plain, Size: 3021 bytes --]
--- hdsp.c.cvs 2003-11-07 14:49:56.000000000 +0100
+++ hdsp.c 2003-11-21 17:15:18.000000000 +0100
@@ -1109,16 +1109,17 @@
rate_bits = HDSP_Frequency176_4KHz;
break;
case 192000:
- if (current_rate != 192000) {
+ if (current_rate < 128000) {
reject_if_open = 1;
}
rate_bits = HDSP_Frequency192KHz;
+ break;
default:
return -EINVAL;
}
if (reject_if_open && (hdsp->capture_pid >= 0 || hdsp->playback_pid >= 0)) {
- snd_printk ("cannot change between single- and double-speed mode (capture PID = %d, playback PID = %d)\n",
+ snd_printk ("cannot change speed mode (capture PID = %d, playback PID = %d)\n",
hdsp->capture_pid,
hdsp->playback_pid);
return -EBUSY;
@@ -2102,9 +2103,11 @@
switch (mode) {
case HDSP_CLOCK_SOURCE_AUTOSYNC:
if (hdsp_external_sample_rate(hdsp) != 0) {
- hdsp->control_register &= ~HDSP_ClockModeMaster;
- hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register);
- return 0;
+ if (!hdsp_set_rate(hdsp, hdsp_external_sample_rate(hdsp), 1)) {
+ hdsp->control_register &= ~HDSP_ClockModeMaster;
+ hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register);
+ return 0;
+ }
}
return -1;
case HDSP_CLOCK_SOURCE_INTERNAL_32KHZ:
@@ -4189,30 +4192,36 @@
static int snd_hdsp_hw_rule_in_channels(snd_pcm_hw_params_t *params,
snd_pcm_hw_rule_t *rule)
{
- unsigned int list[2];
+ unsigned int list[3];
hdsp_t *hdsp = rule->private;
snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
if (hdsp->io_type == H9632) {
list[0] = hdsp->qs_in_channels;
+ list[1] = hdsp->ds_in_channels;
+ list[2] = hdsp->ss_in_channels;
+ return snd_interval_list(c, 3, list, 0);
} else {
list[0] = hdsp->ds_in_channels;
+ list[1] = hdsp->ss_in_channels;
}
- list[1] = hdsp->ss_in_channels;
return snd_interval_list(c, 2, list, 0);
}
static int snd_hdsp_hw_rule_out_channels(snd_pcm_hw_params_t *params,
snd_pcm_hw_rule_t *rule)
{
- unsigned int list[2];
+ unsigned int list[3];
hdsp_t *hdsp = rule->private;
snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
if (hdsp->io_type == H9632) {
list[0] = hdsp->qs_out_channels;
+ list[1] = hdsp->ds_out_channels;
+ list[2] = hdsp->ss_out_channels;
+ return snd_interval_list(c, 3, list, 0);
} else {
list[0] = hdsp->ds_out_channels;
+ list[1] = hdsp->ss_out_channels;
}
- list[1] = hdsp->ss_out_channels;
return snd_interval_list(c, 2, list, 0);
}
@@ -4229,7 +4238,7 @@
.integer = 1,
};
return snd_interval_refine(c, &t);
- } else if (r->min > 48000) {
+ } else if (r->min > 48000 && r->max <= 96000) {
snd_interval_t t = {
.min = hdsp->ds_in_channels,
.max = hdsp->ds_in_channels,
@@ -4260,7 +4269,7 @@
.integer = 1,
};
return snd_interval_refine(c, &t);
- } else if (r->min > 48000) {
+ } else if (r->min > 48000 && r->max <= 96000) {
snd_interval_t t = {
.min = hdsp->ds_out_channels,
.max = hdsp->ds_out_channels,
next reply other threads:[~2003-11-23 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-23 17:21 Thomas Charbonnel [this message]
2003-11-24 11:40 ` hdsp update Takashi Iwai
2003-11-24 14:52 ` Takashi Iwai
2003-11-24 17:48 ` Thomas Charbonnel
2003-11-24 18:17 ` Takashi Iwai
2003-11-24 18:37 ` Thomas Charbonnel
2003-11-25 11:56 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2003-11-06 12:37 hdsp9632 mixer fix + gcc 2.9x compile fix Thomas Charbonnel
2003-11-07 11:18 ` hdsp update Benouille
2003-11-07 12:55 ` Thomas Charbonnel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FC0EC7D.1010701@undata.org \
--to=thomas@undata.org \
--cc=alsa-devel@lists.sourceforge.net \
--cc=torger@ludd.luth.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox