Skip to content

Commit 12b76f3

Browse files
committed
Merge tag 'sound-fix-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Here are a collection of small fixes tha have been gathered for 4.4-rc1. The only significant changes are those in PCI drivers Kconfig, to use "depends on" instead of "select" for CONFIG_ZONE_DMA. A reverse select is often more user-friendly, but in this case, it makes hard to manage with the conflict with ZONE_DEVICE, so changed in such a way for now. Others are all small fixes and quirks: an error check in soundcore reigster_chrdev(), HD-audio HDMI/DP phantom jack fix, Intel Broxton DP quirk, USB-audio DSD device quirk, some constifications, etc" * tag 'sound-fix-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pci: depend on ZONE_DMA ALSA: hda - Simplify phantom jack handling for HDMI/DP ALSA: hda/hdmi - apply Skylake fix-ups to Broxton display codec ALSA: ctxfi: constify rsc ops structures ALSA: usb: Add native DSD support for Aune X1S ALSA: oxfw: add an comment to Kconfig for TASCAM FireOne sound: fix check for error condition of register_chrdev()
2 parents b3a0d9a + 2db1a57 commit 12b76f3

15 files changed

+43
-51
lines changed

sound/firewire/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ config SND_OXFW
3838
* Mackie(Loud) Tapco Link.Firewire
3939
* Mackie(Loud) d.2 pro/d.4 pro
4040
* Mackie(Loud) U.420/U.420d
41+
* TASCAM FireOne
4142

4243
To compile this driver as a module, choose M here: the module
4344
will be called snd-oxfw.

sound/pci/Kconfig

+12-12
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ config SND_ALS300
2525
select SND_PCM
2626
select SND_AC97_CODEC
2727
select SND_OPL3_LIB
28-
select ZONE_DMA
28+
depends on ZONE_DMA
2929
help
3030
Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+
3131

@@ -50,7 +50,7 @@ config SND_ALI5451
5050
tristate "ALi M5451 PCI Audio Controller"
5151
select SND_MPU401_UART
5252
select SND_AC97_CODEC
53-
select ZONE_DMA
53+
depends on ZONE_DMA
5454
help
5555
Say Y here to include support for the integrated AC97 sound
5656
device on motherboards using the ALi M5451 Audio Controller
@@ -155,7 +155,7 @@ config SND_AZT3328
155155
select SND_PCM
156156
select SND_RAWMIDI
157157
select SND_AC97_CODEC
158-
select ZONE_DMA
158+
depends on ZONE_DMA
159159
help
160160
Say Y here to include support for Aztech AZF3328 (PCI168)
161161
soundcards.
@@ -463,7 +463,7 @@ config SND_EMU10K1
463463
select SND_HWDEP
464464
select SND_RAWMIDI
465465
select SND_AC97_CODEC
466-
select ZONE_DMA
466+
depends on ZONE_DMA
467467
help
468468
Say Y to include support for Sound Blaster PCI 512, Live!,
469469
Audigy and E-mu APS (partially supported) soundcards.
@@ -479,7 +479,7 @@ config SND_EMU10K1X
479479
tristate "Emu10k1X (Dell OEM Version)"
480480
select SND_AC97_CODEC
481481
select SND_RAWMIDI
482-
select ZONE_DMA
482+
depends on ZONE_DMA
483483
help
484484
Say Y here to include support for the Dell OEM version of the
485485
Sound Blaster Live!.
@@ -513,7 +513,7 @@ config SND_ES1938
513513
select SND_OPL3_LIB
514514
select SND_MPU401_UART
515515
select SND_AC97_CODEC
516-
select ZONE_DMA
516+
depends on ZONE_DMA
517517
help
518518
Say Y here to include support for soundcards based on ESS Solo-1
519519
(ES1938, ES1946, ES1969) chips.
@@ -525,7 +525,7 @@ config SND_ES1968
525525
tristate "ESS ES1968/1978 (Maestro-1/2/2E)"
526526
select SND_MPU401_UART
527527
select SND_AC97_CODEC
528-
select ZONE_DMA
528+
depends on ZONE_DMA
529529
help
530530
Say Y here to include support for soundcards based on ESS Maestro
531531
1/2/2E chips.
@@ -612,7 +612,7 @@ config SND_ICE1712
612612
select SND_MPU401_UART
613613
select SND_AC97_CODEC
614614
select BITREVERSE
615-
select ZONE_DMA
615+
depends on ZONE_DMA
616616
help
617617
Say Y here to include support for soundcards based on the
618618
ICE1712 (Envy24) chip.
@@ -700,7 +700,7 @@ config SND_LX6464ES
700700
config SND_MAESTRO3
701701
tristate "ESS Allegro/Maestro3"
702702
select SND_AC97_CODEC
703-
select ZONE_DMA
703+
depends on ZONE_DMA
704704
help
705705
Say Y here to include support for soundcards based on ESS Maestro 3
706706
(Allegro) chips.
@@ -806,7 +806,7 @@ config SND_SIS7019
806806
tristate "SiS 7019 Audio Accelerator"
807807
depends on X86_32
808808
select SND_AC97_CODEC
809-
select ZONE_DMA
809+
depends on ZONE_DMA
810810
help
811811
Say Y here to include support for the SiS 7019 Audio Accelerator.
812812

@@ -818,7 +818,7 @@ config SND_SONICVIBES
818818
select SND_OPL3_LIB
819819
select SND_MPU401_UART
820820
select SND_AC97_CODEC
821-
select ZONE_DMA
821+
depends on ZONE_DMA
822822
help
823823
Say Y here to include support for soundcards based on the S3
824824
SonicVibes chip.
@@ -830,7 +830,7 @@ config SND_TRIDENT
830830
tristate "Trident 4D-Wave DX/NX; SiS 7018"
831831
select SND_MPU401_UART
832832
select SND_AC97_CODEC
833-
select ZONE_DMA
833+
depends on ZONE_DMA
834834
help
835835
Say Y here to include support for soundcards based on Trident
836836
4D-Wave DX/NX or SiS 7018 chips.

sound/pci/ctxfi/ctamixer.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static int amixer_output_slot(const struct rsc *rsc)
4949
return (amixer_index(rsc) << 4) + 0x4;
5050
}
5151

52-
static struct rsc_ops amixer_basic_rsc_ops = {
52+
static const struct rsc_ops amixer_basic_rsc_ops = {
5353
.master = amixer_master,
5454
.next_conj = amixer_next_conj,
5555
.index = amixer_index,
@@ -186,7 +186,7 @@ static int amixer_setup(struct amixer *amixer, struct rsc *input,
186186
return 0;
187187
}
188188

189-
static struct amixer_rsc_ops amixer_ops = {
189+
static const struct amixer_rsc_ops amixer_ops = {
190190
.set_input = amixer_set_input,
191191
.set_invalid_squash = amixer_set_invalid_squash,
192192
.set_scale = amixer_set_y,
@@ -357,7 +357,7 @@ static int sum_output_slot(const struct rsc *rsc)
357357
return (sum_index(rsc) << 4) + 0xc;
358358
}
359359

360-
static struct rsc_ops sum_basic_rsc_ops = {
360+
static const struct rsc_ops sum_basic_rsc_ops = {
361361
.master = sum_master,
362362
.next_conj = sum_next_conj,
363363
.index = sum_index,

sound/pci/ctxfi/ctamixer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct amixer {
5858
unsigned char idx[8];
5959
struct rsc *input; /* pointer to a resource acting as source */
6060
struct sum *sum; /* Put amixer output to this summation node */
61-
struct amixer_rsc_ops *ops; /* AMixer specific operations */
61+
const struct amixer_rsc_ops *ops; /* AMixer specific operations */
6262
};
6363

6464
struct amixer_rsc_ops {

sound/pci/ctxfi/ctdaio.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,21 @@ static int daio_in_next_conj_20k2(struct rsc *rsc)
8383
return rsc->conj += 0x100;
8484
}
8585

86-
static struct rsc_ops daio_out_rsc_ops = {
86+
static const struct rsc_ops daio_out_rsc_ops = {
8787
.master = daio_master,
8888
.next_conj = daio_out_next_conj,
8989
.index = daio_index,
9090
.output_slot = NULL,
9191
};
9292

93-
static struct rsc_ops daio_in_rsc_ops_20k1 = {
93+
static const struct rsc_ops daio_in_rsc_ops_20k1 = {
9494
.master = daio_master,
9595
.next_conj = daio_in_next_conj_20k1,
9696
.index = NULL,
9797
.output_slot = daio_index,
9898
};
9999

100-
static struct rsc_ops daio_in_rsc_ops_20k2 = {
100+
static const struct rsc_ops daio_in_rsc_ops_20k2 = {
101101
.master = daio_master,
102102
.next_conj = daio_in_next_conj_20k2,
103103
.index = NULL,
@@ -263,7 +263,7 @@ static int dao_clear_right_input(struct dao *dao)
263263
return 0;
264264
}
265265

266-
static struct dao_rsc_ops dao_ops = {
266+
static const struct dao_rsc_ops dao_ops = {
267267
.set_spos = dao_spdif_set_spos,
268268
.commit_write = dao_commit_write,
269269
.get_spos = dao_spdif_get_spos,
@@ -318,7 +318,7 @@ static int dai_commit_write(struct dai *dai)
318318
return 0;
319319
}
320320

321-
static struct dai_rsc_ops dai_ops = {
321+
static const struct dai_rsc_ops dai_ops = {
322322
.set_srt_srcl = dai_set_srt_srcl,
323323
.set_srt_srcr = dai_set_srt_srcr,
324324
.set_srt_msr = dai_set_srt_msr,

sound/pci/ctxfi/ctdaio.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct daio {
5151

5252
struct dao {
5353
struct daio daio;
54-
struct dao_rsc_ops *ops; /* DAO specific operations */
54+
const struct dao_rsc_ops *ops; /* DAO specific operations */
5555
struct imapper **imappers;
5656
struct daio_mgr *mgr;
5757
struct hw *hw;
@@ -60,7 +60,7 @@ struct dao {
6060

6161
struct dai {
6262
struct daio daio;
63-
struct dai_rsc_ops *ops; /* DAI specific operations */
63+
const struct dai_rsc_ops *ops; /* DAI specific operations */
6464
struct hw *hw;
6565
void *ctrl_blk;
6666
};

sound/pci/ctxfi/ctresource.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static int rsc_master(struct rsc *rsc)
127127
return rsc->conj = rsc->idx;
128128
}
129129

130-
static struct rsc_ops rsc_generic_ops = {
130+
static const struct rsc_ops rsc_generic_ops = {
131131
.index = rsc_index,
132132
.output_slot = audio_ring_slot,
133133
.master = rsc_master,

sound/pci/ctxfi/ctresource.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct rsc {
3939
u32 msr:4; /* The Master Sample Rate a resource working on */
4040
void *ctrl_blk; /* Chip specific control info block for a resource */
4141
struct hw *hw; /* Chip specific object for hardware access means */
42-
struct rsc_ops *ops; /* Generic resource operations */
42+
const struct rsc_ops *ops; /* Generic resource operations */
4343
};
4444

4545
struct rsc_ops {

sound/pci/ctxfi/ctsrc.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static int src_default_config_arcrw(struct src *src)
335335
return 0;
336336
}
337337

338-
static struct src_rsc_ops src_rsc_ops = {
338+
static const struct src_rsc_ops src_rsc_ops = {
339339
.set_state = src_set_state,
340340
.set_bm = src_set_bm,
341341
.set_sf = src_set_sf,
@@ -611,7 +611,7 @@ static int srcimp_index(const struct rsc *rsc)
611611
return container_of(rsc, struct srcimp, rsc)->idx[rsc->conj];
612612
}
613613

614-
static struct rsc_ops srcimp_basic_rsc_ops = {
614+
static const struct rsc_ops srcimp_basic_rsc_ops = {
615615
.master = srcimp_master,
616616
.next_conj = srcimp_next_conj,
617617
.index = srcimp_index,
@@ -662,7 +662,7 @@ static int srcimp_unmap(struct srcimp *srcimp)
662662
return 0;
663663
}
664664

665-
static struct srcimp_rsc_ops srcimp_ops = {
665+
static const struct srcimp_rsc_ops srcimp_ops = {
666666
.map = srcimp_map,
667667
.unmap = srcimp_unmap
668668
};

sound/pci/ctxfi/ctsrc.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct src_rsc_ops;
4848
struct src {
4949
struct rsc rsc; /* Basic resource info */
5050
struct src *intlv; /* Pointer to next interleaved SRC in a series */
51-
struct src_rsc_ops *ops; /* SRC specific operations */
51+
const struct src_rsc_ops *ops; /* SRC specific operations */
5252
/* Number of contiguous srcs for interleaved usage */
5353
unsigned char multi;
5454
unsigned char mode; /* Working mode of this SRC resource */
@@ -110,7 +110,7 @@ struct srcimp {
110110
struct imapper *imappers;
111111
unsigned int mapped; /* A bit-map indicating which conj rsc is mapped */
112112
struct srcimp_mgr *mgr;
113-
struct srcimp_rsc_ops *ops;
113+
const struct srcimp_rsc_ops *ops;
114114
};
115115

116116
struct srcimp_rsc_ops {

sound/pci/hda/hda_jack.c

+2-16
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static void hda_free_jack_priv(struct snd_jack *jack)
383383
* This assigns a jack-detection kctl to the given pin. The kcontrol
384384
* will have the given name and index.
385385
*/
386-
static int __snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
386+
int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
387387
const char *name, bool phantom_jack)
388388
{
389389
struct hda_jack_tbl *jack;
@@ -410,20 +410,6 @@ static int __snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
410410

411411
return 0;
412412
}
413-
414-
/**
415-
* snd_hda_jack_add_kctl - Add a jack kctl for the given pin
416-
* @codec: the HDA codec
417-
* @nid: pin NID
418-
* @name: the name string for the jack ctl
419-
*
420-
* This is a simple helper calling __snd_hda_jack_add_kctl().
421-
*/
422-
int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
423-
const char *name)
424-
{
425-
return __snd_hda_jack_add_kctl(codec, nid, name, false);
426-
}
427413
EXPORT_SYMBOL_GPL(snd_hda_jack_add_kctl);
428414

429415
static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
@@ -451,7 +437,7 @@ static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
451437
if (phantom_jack)
452438
/* Example final name: "Internal Mic Phantom Jack" */
453439
strncat(name, " Phantom", sizeof(name) - strlen(name) - 1);
454-
err = __snd_hda_jack_add_kctl(codec, nid, name, phantom_jack);
440+
err = snd_hda_jack_add_kctl(codec, nid, name, phantom_jack);
455441
if (err < 0)
456442
return err;
457443

sound/pci/hda/hda_jack.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static inline bool snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid)
8282
bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid);
8383

8484
int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
85-
const char *name);
85+
const char *name, bool phantom_jack);
8686
int snd_hda_jack_add_kctls(struct hda_codec *codec,
8787
const struct auto_pin_cfg *cfg);
8888

sound/pci/hda/patch_hdmi.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
5050
#define is_haswell(codec) ((codec)->core.vendor_id == 0x80862807)
5151
#define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808)
5252
#define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809)
53+
#define is_broxton(codec) ((codec)->core.vendor_id == 0x8086280a)
5354
#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \
54-
|| is_skylake(codec))
55+
|| is_skylake(codec) || is_broxton(codec))
5556

5657
#define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882)
5758
#define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883)
@@ -2096,14 +2097,17 @@ static int generic_hdmi_build_jack(struct hda_codec *codec, int pin_idx)
20962097
struct hdmi_spec *spec = codec->spec;
20972098
struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
20982099
int pcmdev = get_pcm_rec(spec, pin_idx)->device;
2100+
bool phantom_jack;
20992101

21002102
if (pcmdev > 0)
21012103
sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev);
2102-
if (!is_jack_detectable(codec, per_pin->pin_nid))
2104+
phantom_jack = !is_jack_detectable(codec, per_pin->pin_nid);
2105+
if (phantom_jack)
21032106
strncat(hdmi_str, " Phantom",
21042107
sizeof(hdmi_str) - strlen(hdmi_str) - 1);
21052108

2106-
return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str);
2109+
return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str,
2110+
phantom_jack);
21072111
}
21082112

21092113
static int generic_hdmi_build_controls(struct hda_codec *codec)

sound/sound_core.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ static void cleanup_oss_soundcore(void)
655655
static int __init init_oss_soundcore(void)
656656
{
657657
if (preclaim_oss &&
658-
register_chrdev(SOUND_MAJOR, "sound", &soundcore_fops) == -1) {
658+
register_chrdev(SOUND_MAJOR, "sound", &soundcore_fops) < 0) {
659659
printk(KERN_ERR "soundcore: sound device already in use.\n");
660660
return -EBUSY;
661661
}

sound/usb/quirks.c

+1
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
12741274
case USB_ID(0x20b1, 0x000a): /* Gustard DAC-X20U */
12751275
case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
12761276
case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
1277+
case USB_ID(0x20b1, 0x3023): /* Aune X1S 32BIT/384 DSD DAC */
12771278
if (fp->altsetting == 3)
12781279
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
12791280
break;

0 commit comments

Comments
 (0)