Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 99831 Details for
Bug 151638
net-dialup/hsfmodem hda support in kernel 2.6.18
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Second patch
hsf-7.47.00.03-snd_pcm_hw_param_set.patch (text/plain), 2.99 KB, created by
Nemanja Jakovljevic
on 2006-10-16 14:34:36 UTC
(
hide
)
Description:
Second patch
Filename:
MIME Type:
Creator:
Nemanja Jakovljevic
Created:
2006-10-16 14:34:36 UTC
Size:
2.99 KB
patch
obsolete
>diff -urN hsfmodem-7.47.00.03full/modules/GPL/hda/patch_cnxthsf.c hsfmodem-7.47.00.03full-snd_pcm_hw_param_set/modules/GPL/hda/patch_cnxthsf.c >--- hsfmodem-7.47.00.03full/modules/GPL/hda/patch_cnxthsf.c 2006-08-30 10:44:27.000000000 -0400 >+++ hsfmodem-7.47.00.03full-snd_pcm_hw_param_set/modules/GPL/hda/patch_cnxthsf.c 2006-09-20 17:03:26.000000000 -0400 >@@ -441,6 +441,66 @@ > > #include <sound/pcm_params.h> > >+#ifndef FOUND_SND_PCM_HW_PARAM_SET >+static int snd_interval_refine_set(struct snd_interval *i, unsigned int val) >+{ >+ struct snd_interval t; >+ t.empty = 0; >+ t.min = t.max = val; >+ t.openmin = t.openmax = 0; >+ t.integer = 1; >+ return snd_interval_refine(i, &t); >+} >+ >+static int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, >+ snd_pcm_hw_param_t var, unsigned int val, >+ int dir) >+{ >+ int changed; >+ if (hw_is_mask(var)) { >+ struct snd_mask *m = hw_param_mask(params, var); >+ if (val == 0 && dir < 0) { >+ changed = -EINVAL; >+ snd_mask_none(m); >+ } else { >+ if (dir > 0) >+ val++; >+ else if (dir < 0) >+ val--; >+ changed = snd_mask_refine_set(hw_param_mask(params, var), val); >+ } >+ } else if (hw_is_interval(var)) { >+ struct snd_interval *i = hw_param_interval(params, var); >+ if (val == 0 && dir < 0) { >+ changed = -EINVAL; >+ snd_interval_none(i); >+ } else if (dir == 0) >+ changed = snd_interval_refine_set(i, val); >+ else { >+ struct snd_interval t; >+ t.openmin = 1; >+ t.openmax = 1; >+ t.empty = 0; >+ t.integer = 0; >+ if (dir < 0) { >+ t.min = val - 1; >+ t.max = val; >+ } else { >+ t.min = val; >+ t.max = val+1; >+ } >+ changed = snd_interval_refine(i, &t); >+ } >+ } else >+ return -EINVAL; >+ if (changed) { >+ params->cmask |= 1 << var; >+ params->rmask |= 1 << var; >+ } >+ return changed; >+} >+#endif /* !FOUND_SND_PCM_HW_PARAM_SET */ >+ > static int cnxthsf_snd_pcm_change_params(struct snd_pcm_substream *substream, int hw_param_buffer_bytes) > { > //snd_pcm_runtime_t *runtime = substream->runtime; >diff -urN hsfmodem-7.47.00.03full/modules/Makefile hsfmodem-7.47.00.03full-snd_pcm_hw_param_set/modules/Makefile >--- hsfmodem-7.47.00.03full/modules/Makefile 2006-08-30 11:23:53.000000000 -0400 >+++ hsfmodem-7.47.00.03full-snd_pcm_hw_param_set/modules/Makefile 2006-09-20 17:42:49.000000000 -0400 >@@ -100,8 +100,9 @@ > FOUND_KZALLOC := $(shell grep -q 'kzalloc' ${REAL_KERNELSRC}/include/linux/slab.h 2>/dev/null && echo -DFOUND_KZALLOC) > FOUND_OPEN_SUBSTREAM_FILE := $(shell grep -q 'snd_pcm_open_substream.*struct[ \t]*file' ${REAL_KERNELSRC}/include/sound/pcm.h 2>/dev/null && echo -DFOUND_OPEN_SUBSTREAM_FILE) > FOUND_TLV := $(shell test -e ${REAL_KERNELSRC}/include/sound/tlv.h 2>/dev/null && echo -DFOUND_TLV) >+FOUND_SND_PCM_HW_PARAM_SET := $(shell grep -q '_snd_pcm_hw_param_set' ${REAL_KERNELSRC}/include/sound/pcm_params.h 2>/dev/null && echo -DFOUND_SND_PCM_HW_PARAM_SET) > >-HDA_CFLAGS := $(FOUND_KZALLOC) $(FOUND_OPEN_SUBSTREAM_FILE) $(FOUND_TLV) >+HDA_CFLAGS := $(FOUND_KZALLOC) $(FOUND_OPEN_SUBSTREAM_FILE) $(FOUND_TLV) $(FOUND_SND_PCM_HW_PARAM_SET) > > else > KO= o >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 151638
:
99830
| 99831