add Studio Evolution SE6X support
Subsystems (2)
Clemens Ladisch
maintainercover add Studio Evolution SE6X support
This is a driver for an unimportant sound card, and related changes in the support code. Please apply to -next.
sound/pci/Kconfig | 9 + sound/pci/oxygen/Makefile | 2 sound/pci/oxygen/oxygen.h | 2 sound/pci/oxygen/oxygen_lib.c | 26 ++++- sound/pci/oxygen/oxygen_mixer.c | 36 +++++++ sound/pci/oxygen/oxygen_pcm.c | 45 ++++++++- sound/pci/oxygen/se6x.c | 160 ++++++++++++++++++++++++++++++++ 7 files changed, 272 insertions(+), 8 deletions(-)
Clemens Ladisch
maintainerPATCH 1/4 ALSA: oxygen: do not create useless S/PDIF controls
Cards without S/PDIF output do not need those controls.
--- sound/pci/oxygen/oxygen_mixer.c | 9 +++++++++ 1 file changed, 9 insertions(+)
sound/pci/oxygen/oxygen_mixer.c +9 -0
@@ -786,6 +786,9 @@ static const struct snd_kcontrol_new controls[] = { .get = upmix_get, .put = upmix_put, }, +}; + +static const struct snd_kcontrol_new spdif_output_controls[] = { { .iface =SNDRV_CTL_ELEM_IFACE_MIXER , .name =SNDRV_CTL_NAME_IEC958 ("" ,PLAYBACK ,SWITCH ),
@@ -1073,6 +1076,12 @@ int oxygen_mixer_init(struct oxygen *chip) err =add_controls (chip, controls,ARRAY_SIZE (controls));if (err <0 )return err; +if (chip->model.device_config &PLAYBACK_1_TO_SPDIF ) { + err =add_controls (chip, spdif_output_controls, +ARRAY_SIZE (spdif_output_controls)); +if (err <0 ) +return err; + }if (chip->model.device_config &CAPTURE_1_FROM_SPDIF ) { err =add_controls (chip, spdif_input_controls,ARRAY_SIZE (spdif_input_controls));
Clemens Ladisch
maintainerPATCH 2/4 ALSA: oxygen: add support for third analog input
In reply to Clemens LadischMake it possible for cards to have three stereo analog input pairs.
--- sound/pci/oxygen/oxygen.h | 2 +- sound/pci/oxygen/oxygen_lib.c | 15 ++++++++++--- sound/pci/oxygen/oxygen_mixer.c | 27 +++++++++++++++++++++++ sound/pci/oxygen/oxygen_pcm.c | 45 ++++++++++++++++++++++++++++++++++++--- 4 files changed, 82 insertions(+), 7 deletions(-)
sound/pci/oxygen/oxygen.h +1 -1
@@ -35,7 +35,7 @@#define CAPTURE_1_FROM_SPDIF 0x0080#define CAPTURE_2_FROM_I2S_2 0x0100#define CAPTURE_2_FROM_AC97_1 0x0200 -/* CAPTURE_3_FROM_I2S_3 not implemented */ +#define CAPTURE_3_FROM_I2S_3 0x0400#define MIDI_OUTPUT 0x0800#define MIDI_INPUT 0x1000#define AC97_CD_INPUT 0x2000
sound/pci/oxygen/oxygen_lib.c +12 -3
@@ -441,9 +441,18 @@ static void oxygen_init(struct oxygen *chip)oxygen_write16 (chip,OXYGEN_I2S_B_FORMAT ,OXYGEN_I2S_MASTER |OXYGEN_I2S_MUTE_MCLK ); -oxygen_write16 (chip,OXYGEN_I2S_C_FORMAT , -OXYGEN_I2S_MASTER | -OXYGEN_I2S_MUTE_MCLK ); +if (chip->model.device_config &CAPTURE_3_FROM_I2S_3 ) +oxygen_write16 (chip,OXYGEN_I2S_C_FORMAT , +OXYGEN_RATE_48000 | + chip->model.adc_i2s_format | +OXYGEN_I2S_MCLK (chip->model.adc_mclks) | +OXYGEN_I2S_BITS_16 | +OXYGEN_I2S_MASTER | +OXYGEN_I2S_BCLK_64 ); +else +oxygen_write16 (chip,OXYGEN_I2S_C_FORMAT , +OXYGEN_I2S_MASTER | +OXYGEN_I2S_MUTE_MCLK );oxygen_clear_bits32 (chip,OXYGEN_SPDIF_CONTROL ,OXYGEN_SPDIF_OUT_ENABLE |OXYGEN_SPDIF_LOOPBACK );
sound/pci/oxygen/oxygen_mixer.c +27 -0
@@ -941,6 +941,33 @@ static const struct { }, }, { + .pcm_dev = CAPTURE_3_FROM_I2S_3, + .controls = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Analog Input Monitor Playback Switch", + .index = 2, + .info = snd_ctl_boolean_mono_info, + .get = monitor_get, + .put = monitor_put, + .private_value = OXYGEN_ADC_MONITOR_C, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Analog Input Monitor Playback Volume", + .index = 2, + .access =SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ, + .info = monitor_volume_info, + .get = monitor_get, + .put = monitor_put, + .private_value =OXYGEN_ADC_MONITOR_C_HALF_VOL + | (1 << 8), + .tlv = { .p = monitor_db_scale, }, + }, + }, + }, + { .pcm_dev = CAPTURE_1_FROM_SPDIF, .controls = { {
sound/pci/oxygen/oxygen_pcm.c +42 -3
73 lines not on this page · raw message
Clemens Ladisch
maintainerPATCH 3/4 ALSA: oxygen: add XIO2001 initialization
In reply to Clemens LadischConfigure the XIO2001 bridge on PCI Express cards so that it does less needless prefetching.
--- sound/pci/oxygen/oxygen_lib.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
sound/pci/oxygen/oxygen_lib.c +10 -1
@@ -319,11 +319,12 @@ static void oxygen_restore_eeprom(struct oxygen *chip,static void configure_pcie_bridge (struct pci_dev *pci) { -enum {PEX811X ,PI7C9X110 }; +enum {PEX811X ,PI7C9X110 ,XIO2001 };static const struct pci_device_id bridge_ids[] = { {PCI_VDEVICE (PLX ,0x8111 ), .driver_data =PEX811X }, {PCI_VDEVICE (PLX ,0x8112 ), .driver_data =PEX811X }, {PCI_DEVICE (0x12d8 ,0xe110 ), .driver_data =PI7C9X110 }, + {PCI_VDEVICE (TI ,0x8240 ), .driver_data =XIO2001 }, { } };struct pci_dev *bridge;
@@ -357,6 +358,14 @@ static void configure_pcie_bridge(struct pci_dev *pci) tmp |=1 ;/* park the PCI arbiter to the sound chip */ pci_write_config_dword (bridge,0x40 , tmp);break ; + +case XIO2001 :/* Texas Instruments XIO2001 PCIe/PCI bridge */ +pci_read_config_dword (bridge,0xe8 , &tmp); + tmp &= ~0xf ;/* request length limit: 64 bytes */ + tmp &= ~(0xf <<8 ); + tmp |=1 <<8 ;/* request count limit: one buffer */ +pci_write_config_dword (bridge,0xe8 , tmp); +break ; } }
Clemens Ladisch
maintainerPATCH 4/4 ALSA: add Studio Evolution SE6X support
In reply to Clemens LadischAdd a driver for an embedded sound card.
--- sound/pci/Kconfig | 9 +++ sound/pci/oxygen/Makefile | 2 + sound/pci/oxygen/se6x.c | 160 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+) create mode 100644 sound/pci/oxygen/se6x.c
sound/pci/Kconfig +9 -0
@@ -793,6 +793,15 @@ config SND_RME9652 To compile this driver as a module, choose M here: the module will be called snd-rme9652. +config SND_SE6X + tristate "Studio Evolution SE6X" + depends on SND_OXYGEN=n && SND_VIRTUOSO=n # PCI ID conflict + select SND_OXYGEN_LIB + select SND_PCM + select SND_MPU401_UART + help + Say Y or M here only if you actually have this sound card. + config SND_SIS7019 tristate "SiS 7019 Audio Accelerator" depends on X86_32
sound/pci/oxygen/Makefile +2 -0
@@ -1,8 +1,10 @@ snd-oxygen-lib-objs := oxygen_io.o oxygen_lib.o oxygen_mixer.o oxygen_pcm.o snd-oxygen-objs := oxygen.o xonar_dg_mixer.o xonar_dg.o +snd-se6x-objs := se6x.o snd-virtuoso-objs := virtuoso.o xonar_lib.o \ xonar_pcm179x.o xonar_cs43xx.o xonar_wm87x6.o xonar_hdmi.o obj-$(CONFIG_SND_OXYGEN_LIB) += snd-oxygen-lib.o obj-$(CONFIG_SND_OXYGEN) += snd-oxygen.o +obj-$(CONFIG_SND_SE6X) += snd-se6x.o obj-$(CONFIG_SND_VIRTUOSO) += snd-virtuoso.o
sound/pci/oxygen/se6x.c new file +160 -0
160 lines not on this page · raw message
Takashi Iwai
AppliedAt Fri, 16 Jan 2015 22:13:15 +0100,
Quoted 3 lines · Clemens Ladisch
This is a driver for an unimportant sound card, and related changes in the support code. Please apply to -next.
Applied, thanks.
Takashi
Quoted 11 lines
sound/pci/Kconfig | 9 + sound/pci/oxygen/Makefile | 2 sound/pci/oxygen/oxygen.h | 2 sound/pci/oxygen/oxygen_lib.c | 26 ++++- sound/pci/oxygen/oxygen_mixer.c | 36 +++++++ sound/pci/oxygen/oxygen_pcm.c | 45 ++++++++- sound/pci/oxygen/se6x.c | 160 ++++++++++++++++++++++++++++++++ 7 files changed, 272 insertions(+), 8 deletions(-)