aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2014-10-13 02:07:18 -0400
committerTakashi Iwai <tiwai@suse.de>2014-10-15 06:03:05 -0400
commit6a40dc5ab5036722d8102ba7190dbd9d72982637 (patch)
tree2b2e432db50cda8eabf52f937ddda4af4dd7b7ab
parentc8b00fd2f4c504a564adcad5b8bd6952ab850b02 (diff)
ALSA: au88x0: added reference of vortex_t
added a pointer of the vortex in the following functions : vortex_alsafmt_aspfmt vortex_Vort3D_InitializeSource a3dsrc_ZeroStateA3D so that we can have a reference of the vortex in the function. this reference of the vortex will actually be used in a later patch to convert the pr_* macro to dev_*. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/au88x0/au88x0.h4
-rw-r--r--sound/pci/au88x0/au88x0_a3d.c6
-rw-r--r--sound/pci/au88x0/au88x0_core.c5
-rw-r--r--sound/pci/au88x0/au88x0_pcm.c2
4 files changed, 9 insertions, 8 deletions
diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h
index 466a5c8e8354..3a8fefefea77 100644
--- a/sound/pci/au88x0/au88x0.h
+++ b/sound/pci/au88x0/au88x0.h
@@ -243,7 +243,7 @@ static int vortex_core_init(vortex_t * card);
243static int vortex_core_shutdown(vortex_t * card); 243static int vortex_core_shutdown(vortex_t * card);
244static void vortex_enable_int(vortex_t * card); 244static void vortex_enable_int(vortex_t * card);
245static irqreturn_t vortex_interrupt(int irq, void *dev_id); 245static irqreturn_t vortex_interrupt(int irq, void *dev_id);
246static int vortex_alsafmt_aspfmt(int alsafmt); 246static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v);
247 247
248/* Connection stuff. */ 248/* Connection stuff. */
249static void vortex_connect_default(vortex_t * vortex, int en); 249static void vortex_connect_default(vortex_t * vortex, int en);
@@ -278,7 +278,7 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix,
278static void vortex_Vort3D_enable(vortex_t * v); 278static void vortex_Vort3D_enable(vortex_t * v);
279static void vortex_Vort3D_disable(vortex_t * v); 279static void vortex_Vort3D_disable(vortex_t * v);
280static void vortex_Vort3D_connect(vortex_t * vortex, int en); 280static void vortex_Vort3D_connect(vortex_t * vortex, int en);
281static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); 281static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v);
282#endif 282#endif
283 283
284/* Driver stuff. */ 284/* Driver stuff. */
diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c
index 30f760e3d2c0..bc9cda3aa725 100644
--- a/sound/pci/au88x0/au88x0_a3d.c
+++ b/sound/pci/au88x0/au88x0_a3d.c
@@ -484,7 +484,7 @@ static void a3dsrc_ZeroState(a3dsrc_t * a)
484} 484}
485 485
486/* Reset entire A3D engine */ 486/* Reset entire A3D engine */
487static void a3dsrc_ZeroStateA3D(a3dsrc_t * a) 487static void a3dsrc_ZeroStateA3D(a3dsrc_t *a, vortex_t *v)
488{ 488{
489 int i, var, var2; 489 int i, var, var2;
490 490
@@ -601,7 +601,7 @@ static void vortex_Vort3D_enable(vortex_t *v)
601 Vort3DRend_Initialize(v, XT_HEADPHONE); 601 Vort3DRend_Initialize(v, XT_HEADPHONE);
602 for (i = 0; i < NR_A3D; i++) { 602 for (i = 0; i < NR_A3D; i++) {
603 vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); 603 vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2);
604 a3dsrc_ZeroStateA3D(&(v->a3d[0])); 604 a3dsrc_ZeroStateA3D(&v->a3d[0], v);
605 } 605 }
606 /* Register ALSA controls */ 606 /* Register ALSA controls */
607 vortex_a3d_register_controls(v); 607 vortex_a3d_register_controls(v);
@@ -676,7 +676,7 @@ static void vortex_Vort3D_connect(vortex_t * v, int en)
676} 676}
677 677
678/* Initialize one single A3D source. */ 678/* Initialize one single A3D source. */
679static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en) 679static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v)
680{ 680{
681 if (a->vortex == NULL) { 681 if (a->vortex == NULL) {
682 pr_warn 682 pr_warn
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
index 72e81286b70e..00e209617c52 100644
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -2177,7 +2177,8 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
2177 return -EBUSY; 2177 return -EBUSY;
2178 } 2178 }
2179 /* (De)Initialize A3D hardware source. */ 2179 /* (De)Initialize A3D hardware source. */
2180 vortex_Vort3D_InitializeSource(&(vortex->a3d[a3d]), en); 2180 vortex_Vort3D_InitializeSource(&vortex->a3d[a3d], en,
2181 vortex);
2181 } 2182 }
2182 /* Make SPDIF out exclusive to "spdif" device when in use. */ 2183 /* Make SPDIF out exclusive to "spdif" device when in use. */
2183 if ((stream->type == VORTEX_PCM_SPDIF) && (en)) { 2184 if ((stream->type == VORTEX_PCM_SPDIF) && (en)) {
@@ -2765,7 +2766,7 @@ static int vortex_core_shutdown(vortex_t * vortex)
2765 2766
2766/* Alsa support. */ 2767/* Alsa support. */
2767 2768
2768static int vortex_alsafmt_aspfmt(int alsafmt) 2769static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v)
2769{ 2770{
2770 int fmt; 2771 int fmt;
2771 2772
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index 5adc6b92ffab..bdde182f1372 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -332,7 +332,7 @@ static int snd_vortex_pcm_prepare(struct snd_pcm_substream *substream)
332 dir = 1; 332 dir = 1;
333 else 333 else
334 dir = 0; 334 dir = 0;
335 fmt = vortex_alsafmt_aspfmt(runtime->format); 335 fmt = vortex_alsafmt_aspfmt(runtime->format, chip);
336 spin_lock_irq(&chip->lock); 336 spin_lock_irq(&chip->lock);
337 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { 337 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
338 vortex_adbdma_setmode(chip, dma, 1, dir, fmt, 338 vortex_adbdma_setmode(chip, dma, 1, dir, fmt,